diff options
author | Yang Tse <yangsita@gmail.com> | 2013-07-16 23:56:33 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2013-07-16 23:59:05 +0200 |
commit | a10d5e3851c9b54cf3846ca3c4ad8b507e61bd4e (patch) | |
tree | 15ecfb859e73af83681747512ee5882ce7542f0d /lib/slist.c | |
parent | 1016637f5a5662485550294dc7502710bf8fde0e (diff) | |
download | curl-a10d5e3851c9b54cf3846ca3c4ad8b507e61bd4e.tar.gz |
slist.c: Curl_slist_append_nodup() OOM handling fix
Diffstat (limited to 'lib/slist.c')
-rw-r--r-- | lib/slist.c | 3 |
1 files changed, 1 insertions, 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) |