diff options
author | Daniel Stenberg <daniel@haxx.se> | 2009-04-01 12:15:37 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2009-04-01 12:15:37 +0000 |
commit | a06b36dee05e89c2886f6a77a007087382d42e0e (patch) | |
tree | 1b5324d14aa9fadef8bbafb23762f21b55386bc7 | |
parent | 18e1bee8d55087681fc3d9ffba58ffedbf58ee6e (diff) |
- Andre Guibert de Bruet fixed a NULL pointer use in an infof() call if a
strdup() call failed.
-rw-r--r-- | CHANGES | 5 | ||||
-rw-r--r-- | lib/ftp.c | 3 |
2 files changed, 7 insertions, 1 deletions
@@ -6,6 +6,11 @@ Changelog + +Daniel Stenberg (1 Apr 2009) +- Andre Guibert de Bruet fixed a NULL pointer use in an infof() call if a + strdup() call failed. + Daniel Fandrich (31 Mar 2009) - Properly return an error code in curl_easy_recv (reported by Jim Freeman). @@ -3214,7 +3214,8 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, ftpc->prevpath=strdup(""); free(path); } - infof(data, "Remembering we are in dir \"%s\"\n", ftpc->prevpath); + if(ftpc->prevpath) + infof(data, "Remembering we are in dir \"%s\"\n", ftpc->prevpath); } else { ftpc->prevpath = NULL; /* no path */ |