- Andre Guibert de Bruet fixed a NULL pointer use in an infof() call if a

strdup() call failed.
This commit is contained in:
Daniel Stenberg 2009-04-01 12:15:37 +00:00
parent 18e1bee8d5
commit a06b36dee0
2 changed files with 7 additions and 1 deletions

View File

@ -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).

View File

@ -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 */