diff options
author | Daniel Stenberg <daniel@haxx.se> | 2002-12-02 07:18:24 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2002-12-02 07:18:24 +0000 |
commit | ff5308a5af72681ae5eb91dafcc4049476ba5528 (patch) | |
tree | dd37b63f494d64c7fd83ff6601187cddcb61dff5 /lib | |
parent | 3f8ba3a986f56bac535faa82fad5a32200869116 (diff) |
if the PWD reply parser failed, we leaked memory
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ftp.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -544,7 +544,7 @@ CURLcode Curl_ftp_connect(struct connectdata *conn) The directory name can contain any character; embedded double-quotes should be escaped by double-quotes (the "quote-doubling" convention). */ - if('\"' == *ptr) { + if(dir && ('\"' == *ptr)) { /* it started good */ ptr++; while(ptr && *ptr) { @@ -570,6 +570,8 @@ CURLcode Curl_ftp_connect(struct connectdata *conn) } else { /* couldn't get the path */ + free(dir); + infof(data, "Failed to figure out path\n"); } } |