diff options
Diffstat (limited to 'fitz/base_hash.c')
-rw-r--r-- | fitz/base_hash.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fitz/base_hash.c b/fitz/base_hash.c index d4a5133f..e2bf6b04 100644 --- a/fitz/base_hash.c +++ b/fitz/base_hash.c @@ -52,7 +52,7 @@ fz_newhash(int initialsize, int keylen) table->keylen = keylen; table->size = initialsize; table->load = 0; - table->ents = fz_malloc(sizeof(fz_hashentry) * table->size); + table->ents = fz_calloc(table->size, sizeof(fz_hashentry)); memset(table->ents, 0, sizeof(fz_hashentry) * table->size); return table; @@ -104,7 +104,7 @@ fz_resizehash(fz_hashtable *table, int newsize) return; } - table->ents = fz_malloc(sizeof(fz_hashentry) * newsize); + table->ents = fz_calloc(newsize, sizeof(fz_hashentry)); memset(table->ents, 0, sizeof(fz_hashentry) * newsize); table->size = newsize; table->load = 0; |