Fix minor memory leak in rewriteSetObject (#13086)

It seems to be a leak caused by code refactoring in #11290.
it's a small leak, that only happens if there's an IO error.
This commit is contained in:
Binbin
2024-02-22 20:46:56 +08:00
committed by GitHub
parent 4a265554ae
commit bfcaa7db0a

View File

@@ -1854,6 +1854,7 @@ int rewriteSetObject(rio *r, robj *key, robj *o) {
!rioWriteBulkString(r,"SADD",4) ||
!rioWriteBulkObject(r,key))
{
setTypeReleaseIterator(si);
return 0;
}
}