Commit 469109e2 authored by Lenitra's avatar Lenitra
Browse files

??

parent d88cbd8d
Loading
Loading
Loading
Loading
−12
Changes for src/hash_tbl.c: 0 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -42,17 +42,5 @@ int htbl_in(hash_tbl htbl, void* x){
}

void htbl_destroy(hash_tbl htbl){
  for (size_t i = 0; i < htbl->capacity; i++){
    list_t l = htbl->array[i];
    while (l != NULL){
      list_t tmp = l;
      l = l->next;
      if (htbl->free != NULL)
        htbl->free(tmp->val);
      free(tmp);
    }
  }
  free(htbl->array);
  free(htbl);
}