Skip to content

Commit

Permalink
Fix hashtable del bug
Browse files Browse the repository at this point in the history
  • Loading branch information
git-hulk committed Nov 22, 2018
1 parent ebdcfdf commit f94f819
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hashtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ int hashtable_del(hashtable *ht, char *key) {
&& !strncmp(key, current->key, key_size)) {
prev->next = current->next;
if (current == ht->buckets[bucket]) {
ht->buckets[bucket] = NULL;
ht->buckets[bucket] = prev;
}
free(current->key);
ht->free ? ht->free(current->value):free(current->value);
Expand Down

0 comments on commit f94f819

Please sign in to comment.