mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 07:38:49 -05:00
Curl_llist_remove: fix potential NULL pointer deref
Fixes a scan-build warning.
This commit is contained in:
parent
46e852ce26
commit
cec0734b4c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user