diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-22 22:33:36 +0000 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-02-22 22:33:36 +0000 |
commit | f72da52cfc92555b295520ced55213d43df7c897 (patch) | |
tree | 34ed4cf08444e3b931a34f948995fc9f31d4fd8b | |
parent | ffe3ce2615ecd5505aafbed054a939bd07ee5697 (diff) | |
download | netsurf-f72da52cfc92555b295520ced55213d43df7c897.tar.gz netsurf-f72da52cfc92555b295520ced55213d43df7c897.tar.bz2 |
Fix over-allocation of space for hash table chain heads.
-rw-r--r-- | utils/hashtable.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |