aboutsummaryrefslogtreecommitdiff
path: root/lib/transfer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/transfer.c')
-rw-r--r--lib/transfer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c
index 039abf889..67f328971 100644
--- a/lib/transfer.c
+++ b/lib/transfer.c
@@ -2029,6 +2029,9 @@ CURLcode Curl_perform(struct SessionHandle *data)
if(CURLE_OK == res)
res = res2;
}
+ else
+ /* Curl_do() failed, clean up left-overs in the done-call */
+ res2 = Curl_done(conn);
/*
* Important: 'conn' cannot be used here, since it may have been closed