Fix leak when tombstone exists
Former-commit-id: 3d0ccdf6d2ddc523a3532c46cf905023d207b8cb
This commit is contained in:
parent
3b496ea282
commit
00f80cce27
@ -412,7 +412,9 @@ bool redisDbPersistentData::syncDelete(robj *key)
|
||||
auto itr = m_pdbSnapshot->find_cached_threadsafe(szFromObj(key));
|
||||
if (itr != nullptr)
|
||||
{
|
||||
dictAdd(m_pdictTombstone, sdsdup(szFromObj(key)), nullptr);
|
||||
sds keyTombstone = sdsdup(szFromObj(key));
|
||||
if (dictAdd(m_pdictTombstone, keyTombstone, nullptr) != DICT_OK)
|
||||
sdsfree(keyTombstone);
|
||||
}
|
||||
}
|
||||
if (g_pserver->cluster_enabled) slotToKeyDel(key);
|
||||
|
Loading…
x
Reference in New Issue
Block a user