mirror of
https://github.com/fluencelabs/redis
synced 2025-06-23 14:01:34 +00:00
Apply the new dictUnlink() where possible.
Optimizations suggested and originally implemented by @oranagra. Re-applied by @antirez using the modified API.
This commit is contained in:
@ -478,8 +478,9 @@ dictEntry *dictUnlink(dict *ht, const void *key) {
|
||||
}
|
||||
|
||||
/* You need to call this function to really free the entry after a call
|
||||
* to dictUnlink(). */
|
||||
* to dictUnlink(). It's safe to call this function with 'he' = NULL. */
|
||||
void dictFreeUnlinkedEntry(dict *d, dictEntry *he) {
|
||||
if (he == NULL) return;
|
||||
dictFreeKey(d, he);
|
||||
dictFreeVal(d, he);
|
||||
zfree(he);
|
||||
|
Reference in New Issue
Block a user