]> granicus.if.org Git - curl/commitdiff
multi_runsingle: fix possible memory leak
authorDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2014 11:57:13 +0000 (13:57 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 7 Oct 2014 11:57:13 +0000 (13:57 +0200)
Coverity CID 1202837. 'newurl' can in fact be allocated even when
Curl_retry_request() returns failure so free it if need be.

lib/multi.c

index ed2920c53ec8aa9c4f36519a6ba90e2bbbad6aa4..04aba9d0f1c945abef68d00afcff38610ef20226 100644 (file)
@@ -1365,6 +1365,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
           else {
             /* Have error handler disconnect conn if we can't retry */
             disconnect_conn = TRUE;
+            free(newurl);
           }
         }
         else {