mirror of
https://github.com/moparisthebest/curl
synced 2024-12-22 08:08:50 -05:00
prevent memory leak when going out of memory
This commit is contained in:
parent
02c78ecf81
commit
3454319c17
@ -321,6 +321,7 @@ CURLcode Curl_open(struct SessionHandle **curl)
|
|||||||
malloc(sizeof(struct connectdata *) * data->state.numconnects);
|
malloc(sizeof(struct connectdata *) * data->state.numconnects);
|
||||||
|
|
||||||
if(!data->state.connects) {
|
if(!data->state.connects) {
|
||||||
|
free(data->state.headerbuff);
|
||||||
free(data);
|
free(data);
|
||||||
return CURLE_OUT_OF_MEMORY;
|
return CURLE_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user