From f72da52cfc92555b295520ced55213d43df7c897 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Fri, 22 Feb 2013 22:33:36 +0000 Subject: Fix over-allocation of space for hash table chain heads. --- utils/hashtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'utils/hashtable.c') diff --git a/utils/hashtable.c b/utils/hashtable.c index 05cc71570..23b83b32e 100644 --- a/utils/hashtable.c +++ b/utils/hashtable.c @@ -92,7 +92,7 @@ struct hash_table *hash_create(unsigned int chains) } r->nchains = chains; - r->chain = calloc(chains, sizeof(struct hash_entry)); + r->chain = calloc(chains, sizeof(struct hash_entry *)); if (r->chain == NULL) { LOG(("Not enough memory for %d hash table chains.", chains)); -- cgit v1.2.3