mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48: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;
|
e->next->prev = NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
if(!e->prev)
|
||||||
|
list->head = e->next;
|
||||||
|
else
|
||||||
e->prev->next = e->next;
|
e->prev->next = e->next;
|
||||||
|
|
||||||
if(!e->next)
|
if(!e->next)
|
||||||
list->tail = e->prev;
|
list->tail = e->prev;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user