Skip to content

Commit 4e15041

Browse files
committed
Allocate the correct size for the hash table
1 parent 57f4d22 commit 4e15041

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

0x1A-hash_tables/0-hash_table_create.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*/
1010
hash_table_t *hash_table_create(unsigned long int size)
1111
{
12-
hash_table_t *hash_table = malloc(sizeof(hash_node_t));
12+
hash_table_t *hash_table = malloc(sizeof(hash_table_t));
1313
unsigned int index;
1414

1515
if (hash_table == NULL)

0 commit comments

Comments
 (0)