even if Curl_do() fails, we must call Curl_done() to do proper cleaning up

This commit is contained in:
Daniel Stenberg 2004-05-12 09:02:54 +00:00
parent 005042e973
commit a219d774fe
1 changed files with 3 additions and 0 deletions

View File

@ -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