diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-11-02 07:22:27 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-11-02 07:22:27 +0100 |
commit | f81a8364618caf99b4691ffd494a9b2d4c9fb1f6 (patch) | |
tree | e087ac3990f286ca5db490447276e11e4a9214db /lib/ftp.c | |
parent | 3c6c2bcd5af8a111738f9190093dbf8a440d167b (diff) | |
download | curl-f81a8364618caf99b4691ffd494a9b2d4c9fb1f6.tar.gz |
ftp_done: don't clobber the passed in error code
Coverity CID 1374359 pointed out the unused result value.
Diffstat (limited to 'lib/ftp.c')
-rw-r--r-- | lib/ftp.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -3298,11 +3298,12 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status, ftpc->known_filesize = -1; } - /* get the "raw" path */ - result = Curl_urldecode(data, path_to_use, 0, &path, NULL, FALSE); + if(!result) + /* get the "raw" path */ + result = Curl_urldecode(data, path_to_use, 0, &path, NULL, FALSE); if(result) { - /* out of memory, but we can limp along anyway (and should try to - * since we may already be in the out of memory cleanup path) */ + /* We can limp along anyway (and should try to since we may already be in + * the error path) */ ftpc->ctl_valid = FALSE; /* mark control connection as bad */ connclose(conn, "FTP: out of memory!"); /* mark for connection closure */ ftpc->prevpath = NULL; /* no path remembering */ |