diff options
Diffstat (limited to 'lib/hash.c')
-rw-r--r-- | lib/hash.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -32,9 +32,8 @@ hash_create_size (unsigned int size, unsigned int (*hash_key) (void *), struct hash *hash; hash = XMALLOC (MTYPE_HASH, sizeof (struct hash)); - hash->index = XMALLOC (MTYPE_HASH_INDEX, + hash->index = XCALLOC (MTYPE_HASH_INDEX, sizeof (struct hash_backet *) * size); - memset (hash->index, 0, sizeof (struct hash_backet *) * size); hash->size = size; hash->hash_key = hash_key; hash->hash_cmp = hash_cmp; |