From 6437d07b0371047e62c26e88e66bd4df0e2b94ba Mon Sep 17 00:00:00 2001 From: Moti Cohen Date: Wed, 30 Oct 2024 10:03:31 +0200 Subject: [PATCH] Fix memory leak on rdbload error (#13626) On RDB load error, if an invalid `expireAt` value is read, `dupSearchDict` is not released. --- src/rdb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/rdb.c b/src/rdb.c index 0bd4ee1ba..764b87a48 100644 --- a/src/rdb.c +++ b/src/rdb.c @@ -2332,6 +2332,7 @@ robj *rdbLoadObject(int rdbtype, rio *rdb, sds key, int dbid, int *error) rdbReportCorruptRDB("invalid expireAt time: %llu", (unsigned long long) expireAt); decrRefCount(o); + if (dupSearchDict != NULL) dictRelease(dupSearchDict); return NULL; }