Valgrind found this uninitialized block of memory
This commit is contained in:
parent
420d53c511
commit
66c19fea96
|
@ -36,8 +36,7 @@ void init_hashtable(hashtable_t *table,
|
|||
table->free_value = free_value;
|
||||
|
||||
if (initial_bucket_count > 0) {
|
||||
table->buckets = realloc(table->buckets,
|
||||
initial_bucket_count * sizeof(hashtable_entry_t *));
|
||||
table->buckets = calloc(initial_bucket_count, sizeof(hashtable_entry_t *));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue