Permalink
Browse files

hash.c: fix OOM triggered segfault

  • Loading branch information...
1 parent 99a12ba commit 996f2454ba0c4368497637e937f8d184d0151c45 @yangtse yangtse committed Dec 25, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 lib/hash.c
View
3 lib/hash.c
@@ -264,6 +264,9 @@ Curl_hash_clean_with_criterium(struct curl_hash *h, void *user,
struct curl_llist *list;
int i;
+ if(!h)
+ return;
+
for(i = 0; i < h->slots; ++i) {
list = h->table[i];
le = list->head; /* get first list entry */

0 comments on commit 996f245

Please sign in to comment.