]> granicus.if.org Git - curl/commitdiff
free the URL on redirections, this was a previous memory leak
authorDaniel Stenberg <daniel@haxx.se>
Tue, 28 Nov 2000 09:41:01 +0000 (09:41 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 28 Nov 2000 09:41:01 +0000 (09:41 +0000)
lib/highlevel.c

index b3bb9e157796333decbeb56087f059d75bcb9463..fd061bb7ae3611066cd205d7fc35a2a92a094b85 100644 (file)
@@ -718,6 +718,9 @@ CURLcode curl_transfer(CURL *curl)
           /* TBD: set the port with curl_setopt() */
           data->port = 0;
         }
+
+        if(data->bits.urlstringalloc)
+          free(data->url);
       
         /* TBD: set the URL with curl_setopt() */
         data->url = data->newurl;
@@ -744,12 +747,6 @@ CURLcode curl_transfer(CURL *curl)
   if(data->newurl)
     free(data->newurl);
 
-#if 0
-  if((CURLE_OK == res) && data->writeinfo) {
-    /* Time to output some info to stdout */
-    WriteOut(data);
-  }
-#endif
   return res;
 }