diff --git a/src/dict.c b/src/dict.c index a6910869167..8ebe9e5d645 100644 --- a/src/dict.c +++ b/src/dict.c @@ -312,7 +312,7 @@ dictEntry *dictAddRaw(dict *d, void *key, dictEntry **existing) * system it is more likely that recently added entries are accessed * more frequently. */ ht = dictIsRehashing(d) ? &d->ht[1] : &d->ht[0]; - entry = zmalloc(sizeof(*entry)); + entry = zmalloc_dram(sizeof(*entry)); entry->next = ht->table[index]; ht->table[index] = entry; ht->used++; @@ -390,7 +390,7 @@ static dictEntry *dictGenericDelete(dict *d, const void *key, int nofree) { if (!nofree) { dictFreeKey(d, he); dictFreeVal(d, he); - zfree(he); + zfree_dram(he); } d->ht[table].used--; return he; @@ -440,7 +440,7 @@ void dictFreeUnlinkedEntry(dict *d, dictEntry *he) { if (he == NULL) return; dictFreeKey(d, he); dictFreeVal(d, he); - zfree(he); + zfree_dram(he); } /* Destroy an entire dictionary */ @@ -458,7 +458,7 @@ int _dictClear(dict *d, dictht *ht, void(callback)(void *)) { nextHe = he->next; dictFreeKey(d, he); dictFreeVal(d, he); - zfree(he); + zfree_dram(he); ht->used--; he = nextHe; }