diff options
author | Curl Upstream <curl-library@cool.haxx.se> | 2018-01-23 21:49:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-01-24 19:14:23 (GMT) |
commit | af9e654045f11028e50dac4781e297834129a749 (patch) | |
tree | 028fac729d317112e5790204712f4b4c7985a0de /lib/llist.c | |
parent | de7c21d677db1ddaeece03c19e13e448f4031511 (diff) | |
download | CMake-af9e654045f11028e50dac4781e297834129a749.zip CMake-af9e654045f11028e50dac4781e297834129a749.tar.gz CMake-af9e654045f11028e50dac4781e297834129a749.tar.bz2 |
curl 2018-01-23 (d6c21c8e)
Code extracted from:
https://github.com/curl/curl.git
at commit d6c21c8eec597a925d2b647cff3d58ac69de01a0 (curl-7_58_0).
Diffstat (limited to 'lib/llist.c')
-rw-r--r-- | lib/llist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/llist.c b/lib/llist.c index 4bb0a51..f8769c2 100644 --- a/lib/llist.c +++ b/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 |