Avoid queuing null pointers to be freed

Former-commit-id: f50541d437cd1d98139c29407bb3fb4d6ce17fca
This commit is contained in:
John Sully 2021-03-14 03:22:10 +00:00
parent b4d0679232
commit 1f1f5bdc91

View File

@ -403,7 +403,8 @@ void redisDbPersistentData::endSnapshot(const redisDbPersistentDataSnapshot *psn
}
// Delete the object from the source dict, we don't use dictDelete to avoid a second search
splazy->vecde.push_back(deSnapshot);
if (deSnapshot != nullptr)
splazy->vecde.push_back(deSnapshot);
*dePrev = deSnapshot->next;
ht->used--;
}