summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/netrc.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-05-22 16:07:49 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2012-05-22 16:07:49 +0200
commit800694cbf33e206935dc9e6e8fa6e9a036b8efad (patch)
tree1557d96ee0f463a020b11604146be66fb9809a31 /apt-pkg/contrib/netrc.cc
parent6c0c0387e616f8d04f00916fbd1fe899acd265cd (diff)
parent1351329e376a8dbe7780693693d0f3db0ec749fa (diff)
merged (and resolved a bunch of conflicts) of the debian-sid branch
Diffstat (limited to 'apt-pkg/contrib/netrc.cc')
-rw-r--r--apt-pkg/contrib/netrc.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/apt-pkg/contrib/netrc.cc b/apt-pkg/contrib/netrc.cc
index cb7d36088..56e59d84b 100644
--- 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;