projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
* apt-inst/deb/debfile.h:
[apt.git]
/
apt-pkg
/
contrib
/
netrc.cc
diff --git
a/apt-pkg/contrib/netrc.cc
b/apt-pkg/contrib/netrc.cc
index cb7d36088c5d46b57502adcfb35c996d61577ea6..56e59d84b89b64635158e6a74db0156260c753a2 100644
(file)
--- a/
apt-pkg/contrib/netrc.cc
+++ b/
apt-pkg/contrib/netrc.cc
@@
-68,8
+68,7
@@
int parsenetrc (char *host, char *login, char *password, char *netrcfile = NULL)
if (!home)
return -1;
- asprintf (&netrcfile, "%s%s%s", home, DIR_CHAR, NETRC);
- if(!netrcfile)
+ if (asprintf (&netrcfile, "%s%s%s", home, DIR_CHAR, NETRC) == -1 || netrcfile == NULL)
return -1;
else
netrc_alloc = true;