From: Yang Tse Date: Tue, 16 Jul 2013 21:56:33 +0000 (+0200) Subject: slist.c: Curl_slist_append_nodup() OOM handling fix X-Git-Tag: curl-7_32_0~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a10d5e3851c9b54cf3846ca3c4ad8b507e61bd4e;p=curl slist.c: Curl_slist_append_nodup() OOM handling fix --- diff --git a/lib/slist.c b/lib/slist.c index 108d0f005..3cac6ca21 100644 --- a/lib/slist.c +++ b/lib/slist.c @@ -59,8 +59,7 @@ struct curl_slist *Curl_slist_append_nodup(struct curl_slist *list, char *data) struct curl_slist *last; struct curl_slist *new_item; - if(!data) - return NULL; + DEBUGASSERT(data); new_item = malloc(sizeof(struct curl_slist)); if(!new_item)