Fix over-allocation of space for hash table chain heads.

This commit is contained in:
Michael Drake 2013-02-22 22:33:36 +00:00
parent ffe3ce2615
commit f72da52cfc

View File

@ -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));