]> granicus.if.org Git - curl/commitdiff
multi: fix memory-leak on timeout (regression)
authorDaniel Stenberg <daniel@haxx.se>
Thu, 5 Mar 2015 14:19:07 +0000 (15:19 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 5 Mar 2015 14:43:38 +0000 (15:43 +0100)
Since 1342a96ecfe0d44, a timeout detected in the multi state machine didn't
necesarily clear everything up, like formpost data.

Bug: https://github.com/bagder/curl/issues/147
Reported-by: Michel Promonet
Patched-by: Michel Promonet
lib/multi.c

index 41648271d5aef68dbdac7a1bb06e1197649b415a..caf51de7710c3fac7f75d37584623f89310eee37 100644 (file)
@@ -1016,6 +1016,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
           disconnect_conn = TRUE;
         }
         result = CURLE_OPERATION_TIMEDOUT;
+        (void)Curl_done(&data->easy_conn, result, TRUE);
         /* Skip the statemachine and go directly to error handling section. */
         goto statemachine_end;
       }