curl_multi_remove_handle: commit 0aabfd9963 follow-up

This commit is contained in:
Yang Tse
2012-12-26 06:00:59 +01:00
parent d49531dd3a
commit 219fe7b29c
2 changed files with 32 additions and 5 deletions

View File

@@ -208,12 +208,15 @@ Curl_hash_pick(struct curl_hash *h, void *key, size_t key_len)
{
struct curl_llist_element *le;
struct curl_hash_element *he;
struct curl_llist *l = FETCH_LIST(h, key, key_len);
struct curl_llist *l;
for(le = l->head; le; le = le->next) {
he = le->ptr;
if(h->comp_func(he->key, he->key_len, key, key_len)) {
return he->ptr;
if(h) {
l = FETCH_LIST(h, key, key_len);
for(le = l->head; le; le = le->next) {
he = le->ptr;
if(h->comp_func(he->key, he->key_len, key, key_len)) {
return he->ptr;
}
}
}