diff options
Diffstat (limited to 'Utilities/cmcurl/lib/llist.c')
-rw-r--r-- | Utilities/cmcurl/lib/llist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Utilities/cmcurl/lib/llist.c b/Utilities/cmcurl/lib/llist.c index 4bb0a51..f8769c2 100644 --- a/Utilities/cmcurl/lib/llist.c +++ b/Utilities/cmcurl/lib/llist.c @@ -106,7 +106,11 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e, e->next->prev = NULL; } else { - e->prev->next = e->next; + if(!e->prev) + list->head = e->next; + else + e->prev->next = e->next; + if(!e->next) list->tail = e->prev; else |