mirror of
https://github.com/curl/curl.git
synced 2024-11-21 01:16:58 +08: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));
|
||||
|
||||
if(!list) {
|
||||
free(new_item);
|
||||
curl_slist_free_all(new_item);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user