Commit 996f2454 authored by Yang Tse's avatar Yang Tse
Browse files

hash.c: fix OOM triggered segfault

parent 99a12baa
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 */