aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2009-04-20 21:41:17 +0000
committerDaniel Stenberg <daniel@haxx.se>2009-04-20 21:41:17 +0000
commitb84876ba696294849a5abb69543cd9f899e35ee7 (patch)
tree316205ff6d130637393cf07a8c70e553b7a94225 /lib/ftp.c
parent0f1ca2939a43b8f90d68b79b0268c65f5d547ee4 (diff)
- Leanic Lefever reported a crash and did some detailed research on why and
how it occurs (http://curl.haxx.se/mail/lib-2009-04/0289.html). The conclusion was that if an error is detected and Curl_done() is called for the connection, ftp_done() could at times return another error code that then would take precedence and that new code confused existing logic that works for the first error code (CURLE_SEND_ERROR) only.
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index b78617e75..422bac219 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3185,6 +3185,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
ftpc->cwdfail = TRUE; /* set this TRUE to prevent us to remember the
current path, as this connection is going */
conn->bits.close = TRUE; /* marked for closure */
+ result = status; /* use the already set error code */
break;
}