Fix crash freeing nested hash with list

Former-commit-id: 1eb035e6ad23048df8103300c65fd219297ceff7
This commit is contained in:
John Sully 2020-12-11 00:23:14 +00:00
parent 300eca8ff6
commit ffd99133ef

View File

@ -310,8 +310,10 @@ void freeStringObject(robj_roptr o) {
void freeListObject(robj_roptr o) {
if (o->encoding == OBJ_ENCODING_QUICKLIST) {
quicklistRelease((quicklist*)ptrFromObj(o));
} else if (o->encoding == OBJ_ENCODING_ZIPLIST) {
zfree(ptrFromObj(o));
} else {
serverPanic("Unknown list encoding type");
serverPanic("Unknown list encoding type: %d", o->encoding);
}
}