]> granicus.if.org Git - curl/commitdiff
multi interface: when a request is denied due to "Maximum redirects followed"
authorDaniel Stenberg <daniel@haxx.se>
Sat, 29 Jan 2005 12:01:20 +0000 (12:01 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 29 Jan 2005 12:01:20 +0000 (12:01 +0000)
libcurl leaked the last Location: URL.

CHANGES
lib/multi.c

diff --git a/CHANGES b/CHANGES
index c33f4e709c22e0fad92660a2e87a078478b15fbd..42317ac858f9fb2549d10dcb04c7af25a7080f2b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,9 @@
                                   Changelog
 
 Daniel (29 January 2005)
+- multi interface: when a request is denied due to "Maximum redirects
+  followed" libcurl leaked the last Location: URL.
+
 - Connect failures with the multi interface was often returned as "connect()
   timed out" even though the reason was different.
 
index 62bffec4549109526a286b596586cf8e1a067f9a..f569c281a864b78b542a99d5190cdc17b7e6be23 100644 (file)
@@ -523,6 +523,10 @@ CURLMcode curl_multi_perform(CURLM *multi_handle, int *running_handles)
               easy->state = CURLM_STATE_CONNECT;
               result = CURLM_CALL_MULTI_PERFORM;
             }
+            else
+              /* Since we "took it", we are in charge of freeing this on
+                 failure */
+              free(newurl);
           }
           else {
             easy->state = CURLM_STATE_DONE;