Skip to content
Snippets Groups Projects
Commit ff5308a5 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

if the PWD reply parser failed, we leaked memory

parent 3f8ba3a9
No related branches found
No related tags found
No related merge requests found
......@@ -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");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment