aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-12-25 11:35:45 +0100
committerYang Tse <yangsita@gmail.com>2011-12-25 11:35:45 +0100
commit996f2454ba0c4368497637e937f8d184d0151c45 (patch)
tree5a8338b3f886da05e740c005b45054eea3945742 /lib
parent99a12baa34b59b14d9b43c00e882cfe1d6b0403d (diff)
hash.c: fix OOM triggered segfault
Diffstat (limited to 'lib')
-rw-r--r--lib/hash.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/hash.c b/lib/hash.c
index 3704eea41..4d85188fb 100644
--- a/lib/hash.c
+++ b/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 */