Bertrand Demiddelaer found and fixed this memory leak.

This commit is contained in:
Daniel Stenberg 2003-01-24 11:13:59 +00:00
parent a302ff1605
commit 2b054e5309
1 changed files with 3 additions and 0 deletions

View 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;