aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2005-10-21 21:00:44 +0000
committerDaniel Stenberg <daniel@haxx.se>2005-10-21 21:00:44 +0000
commit1a1ab2e2e8abb6618721188109156e5bdda35cdd (patch)
tree4a26813912a75b3c1c2989b468fcd54b2918ad84 /lib
parent715b706caaf57e5ab1a395ea173b5f16f5b05922 (diff)
"Ofer" reported a problem when libcurl re-used a connection and failed to do
it, it could then accidentally actually crash. Presumably, this concerns FTP connections. http://curl.haxx.se/bug/view.cgi?id=1330310
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 3f11b3e75..c4f3fbf3d 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3844,7 +3844,14 @@ CURLcode Curl_do(struct connectdata **connp, bool *done)
/* conn may no longer be a good pointer */
- if(CURLE_OK == result) {
+ /*
+ * According to bug report #1330310. We need to check for
+ * CURLE_SEND_ERROR here as well. I figure this could happen when the
+ * request failed on a FTP connection and thus Curl_done() itself tried
+ * to use the connection (again). Slight Lack of feedback in the report,
+ * but I don't think this extra check can do much harm.
+ */
+ if((CURLE_OK == result) || (CURLE_SEND_ERROR == result)) {
bool async;
bool protocol_done = TRUE;