From: Daniel Stenberg Date: Fri, 24 Jan 2003 11:13:59 +0000 (+0000) Subject: Bertrand Demiddelaer found and fixed this memory leak. X-Git-Tag: curl-7_10_4~179 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b054e53099fdd44f67eb84dc44b546f03a89528;p=curl Bertrand Demiddelaer found and fixed this memory leak. --- diff --git a/lib/transfer.c b/lib/transfer.c index b860805c6..6085cb45b 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -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;