From a10d5e3851c9b54cf3846ca3c4ad8b507e61bd4e Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Tue, 16 Jul 2013 23:56:33 +0200 Subject: [PATCH] slist.c: Curl_slist_append_nodup() OOM handling fix --- lib/slist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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)