mirror of
https://github.com/moparisthebest/curl
synced 2024-11-10 11:35:07 -05:00
Bertrand Demiddelaer found and fixed this memory leak.
This commit is contained in:
parent
a302ff1605
commit
2b054e5309
@ -573,6 +573,9 @@ CURLcode Curl_readwrite(struct connectdata *conn,
|
|||||||
end++, len++);
|
end++, len++);
|
||||||
|
|
||||||
/* allocate memory of a cloned copy */
|
/* allocate memory of a cloned copy */
|
||||||
|
if(data->info.contenttype)
|
||||||
|
free(data->info.contenttype);
|
||||||
|
|
||||||
data->info.contenttype = malloc(len + 1);
|
data->info.contenttype = malloc(len + 1);
|
||||||
if (NULL == data->info.contenttype)
|
if (NULL == data->info.contenttype)
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
|
Loading…
Reference in New Issue
Block a user