mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
tool: Fixed a memory leak on OOM introduced in 19cb0c4a
This commit is contained in:
parent
23b8fc15c8
commit
729b92afbe
@ -45,7 +45,7 @@ struct slist_wc *slist_wc_append(struct slist_wc *list,
|
|||||||
list = malloc(sizeof(struct slist_wc));
|
list = malloc(sizeof(struct slist_wc));
|
||||||
|
|
||||||
if(!list) {
|
if(!list) {
|
||||||
free(new_item);
|
curl_slist_free_all(new_item);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user