Unverified Commit 6437d07b authored by Moti Cohen's avatar Moti Cohen Committed by GitHub
Browse files

Fix memory leak on rdbload error (#13626)

On RDB load error, if an invalid `expireAt` value is read,
`dupSearchDict` is not released.
parent 4b29be3f
...@@ -2332,6 +2332,7 @@ robj *rdbLoadObject(int rdbtype, rio *rdb, sds key, int dbid, int *error) ...@@ -2332,6 +2332,7 @@ robj *rdbLoadObject(int rdbtype, rio *rdb, sds key, int dbid, int *error)
rdbReportCorruptRDB("invalid expireAt time: %llu", rdbReportCorruptRDB("invalid expireAt time: %llu",
(unsigned long long) expireAt); (unsigned long long) expireAt);
decrRefCount(o); decrRefCount(o);
if (dupSearchDict != NULL) dictRelease(dupSearchDict);
return NULL; return NULL;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment