diff options
author | Brad King <brad.king@kitware.com> | 2018-01-24 19:17:42 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-01-24 19:18:16 (GMT) |
commit | cd8e31a1bf7429514078c2923a1a9580113f9d4f (patch) | |
tree | 6a0b8a01e3e0e52bb4b3abb66ce9e992614af6a7 /Utilities/cmcurl/lib/llist.c | |
parent | e9c8ea75575afdb4e87b262641ee4071ef42b4c6 (diff) | |
parent | af9e654045f11028e50dac4781e297834129a749 (diff) | |
download | CMake-cd8e31a1bf7429514078c2923a1a9580113f9d4f.zip CMake-cd8e31a1bf7429514078c2923a1a9580113f9d4f.tar.gz CMake-cd8e31a1bf7429514078c2923a1a9580113f9d4f.tar.bz2 |
Merge branch 'upstream-curl' into update-curl
* upstream-curl:
curl 2018-01-23 (d6c21c8e)
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 |