]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/contrib/netrc.cc
Russian program translation (Yuri Kozlov) (Closes: #679599)
[apt.git] / apt-pkg / contrib / netrc.cc
index cb7d36088c5d46b57502adcfb35c996d61577ea6..56e59d84b89b64635158e6a74db0156260c753a2 100644 (file)
@@ -68,8 +68,7 @@ int parsenetrc (char *host, char *login, char *password, char *netrcfile = NULL)
     if (!home)
       return -1;
 
     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;
       return -1;
     else
       netrc_alloc = true;