summaryrefslogtreecommitdiff
path: root/lib/llist.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-10-07 20:50:57 +0200
committerYang Tse <yangsita@gmail.com>2011-10-07 20:50:57 +0200
commit17f48fe87979f159e2d8769d678641c60f4c0eed (patch)
tree322c1d34d9c8d0a4d203d127765818f297ac93c7 /lib/llist.c
parentb82bd05354cfa756a013d2bed4ffdc951ce903db (diff)
downloadcurl-17f48fe87979f159e2d8769d678641c60f4c0eed.tar.gz
libcurl: some OOM handling fixes
Diffstat (limited to 'lib/llist.c')
-rw-r--r--lib/llist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/llist.c b/lib/llist.c
index 9ad1db59b..0aecf1083 100644
--- a/lib/llist.c
+++ b/lib/llist.c
@@ -131,6 +131,10 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
list->dtor(user, e->ptr);
+ e->ptr = NULL;
+ e->prev = NULL;
+ e->next = NULL;
+
free(e);
--list->size;