diff options
author | Daniel Stenberg <daniel@haxx.se> | 2005-01-30 22:54:06 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2005-01-30 22:54:06 +0000 |
commit | 686d767053e413feacb95fb7ddd9b3883984a3cb (patch) | |
tree | 2725d438e4567999b04711b83e828a8df78c959c | |
parent | ed3176dd6b5d9d6d26acc95f297cb3ef763ad54e (diff) |
if the DO operation returns failure, bail out and close down nicely to
prevent memory leakage
-rw-r--r-- | lib/multi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/multi.c b/lib/multi.c index e4773d06d..159e51e53 100644 --- a/lib/multi.c +++ b/lib/multi.c @@ -462,6 +462,13 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles) } } } + else { + /* failure detected */ + Curl_posttransfer(easy->easy_handle); + Curl_done(&easy->easy_conn, easy->result); + Curl_disconnect(easy->easy_conn); /* close the connection */ + easy->easy_conn = NULL; /* no more connection */ + } break; case CURLM_STATE_DO_MORE: |