]> granicus.if.org Git - curl/commitdiff
Bertrand Demiddelaer found and fixed this memory leak.
authorDaniel Stenberg <daniel@haxx.se>
Fri, 24 Jan 2003 11:13:59 +0000 (11:13 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 24 Jan 2003 11:13:59 +0000 (11:13 +0000)
lib/transfer.c

index b860805c6bfe6ce76a3ba6a2e977ebf4a8c56f5c..6085cb45beaf37fcf28de0740dc633b35d9abaf5 100644 (file)
@@ -573,6 +573,9 @@ CURLcode Curl_readwrite(struct connectdata *conn,
                   end++, len++);
 
               /* allocate memory of a cloned copy */
+              if(data->info.contenttype)
+                free(data->info.contenttype);
+              
               data->info.contenttype = malloc(len + 1);
               if (NULL == data->info.contenttype)
                 return CURLE_OUT_OF_MEMORY;