From a06b36dee05e89c2886f6a77a007087382d42e0e Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 1 Apr 2009 12:15:37 +0000 Subject: - Andre Guibert de Bruet fixed a NULL pointer use in an infof() call if a strdup() call failed. --- lib/ftp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ftp.c b/lib/ftp.c index 0e75a424d..5282204a7 100644 --- a/lib/ftp.c +++ b/lib/ftp.c @@ -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 */ -- cgit v1.2.3