Fix memory leak on rdbload error (#13626)

On RDB load error, if an invalid `expireAt` value is read,
`dupSearchDict` is not released.
This commit is contained in:
Moti Cohen 2024-10-30 10:03:31 +02:00 committed by GitHub
parent 4b29be3f36
commit 6437d07b03
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}