mirror of
https://github.com/moparisthebest/curl
synced 2025-03-07 20:59:41 -05:00
slist.c: Curl_slist_append_nodup() OOM handling fix
This commit is contained in:
parent
1016637f5a
commit
a10d5e3851
@ -59,8 +59,7 @@ struct curl_slist *Curl_slist_append_nodup(struct curl_slist *list, char *data)
|
|||||||
struct curl_slist *last;
|
struct curl_slist *last;
|
||||||
struct curl_slist *new_item;
|
struct curl_slist *new_item;
|
||||||
|
|
||||||
if(!data)
|
DEBUGASSERT(data);
|
||||||
return NULL;
|
|
||||||
|
|
||||||
new_item = malloc(sizeof(struct curl_slist));
|
new_item = malloc(sizeof(struct curl_slist));
|
||||||
if(!new_item)
|
if(!new_item)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user