summaryrefslogtreecommitdiff
path: root/lib/llist.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-05-09 12:47:49 +0200
committerng0 <ng0@infotropique.org>2017-08-22 15:26:18 +0000
commit06816bd8b5fcc1e7caad253ae3b2ed94cda97a2f (patch)
treec76815f179122967073addab595be2aa921fbc70 /lib/llist.c
parent87fe0a8f8363b1869b8a34c32b18ee92fbadde69 (diff)
downloadgnurl-06816bd8b5fcc1e7caad253ae3b2ed94cda97a2f.tar.gz
gnurl-06816bd8b5fcc1e7caad253ae3b2ed94cda97a2f.tar.bz2
gnurl-06816bd8b5fcc1e7caad253ae3b2ed94cda97a2f.zip
multi: use a fixed array of timers instead of malloc
... since the total amount is low this is faster, easier and reduces memory overhead. Also, Curl_expire_done() can now mark an expire timeout as done so that it never times out. Closes #1472
Diffstat (limited to 'lib/llist.c')
-rw-r--r--lib/llist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/llist.c b/lib/llist.c
index 06cebb971..4bb0a51b8 100644
--- a/lib/llist.c
+++ b/lib/llist.c
@@ -122,7 +122,8 @@ Curl_llist_remove(struct curl_llist *list, struct curl_llist_element *e,
--list->size;
/* call the dtor() last for when it actually frees the 'e' memory itself */
- list->dtor(user, ptr);
+ if(list->dtor)
+ list->dtor(user, ptr);
}
void