slist.c: Curl_slist_append_nodup() OOM handling fix

This commit is contained in:
Yang Tse 2013-07-16 23:56:33 +02:00
parent 1016637f5a
commit a10d5e3851
1 changed files with 1 additions and 2 deletions

View File

@ -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)