mirror of
http://github.com/valkey-io/valkey
synced 2024-11-22 18:04:52 +00:00
Merge pull request #6558 from oranagra/module_testrdb_leak
fix leak in module api rdb test
This commit is contained in:
commit
b311a368e0
@ -18,8 +18,11 @@ void *testrdb_type_load(RedisModuleIO *rdb, int encver) {
|
|||||||
RedisModuleString *str = RedisModule_LoadString(rdb);
|
RedisModuleString *str = RedisModule_LoadString(rdb);
|
||||||
float f = RedisModule_LoadFloat(rdb);
|
float f = RedisModule_LoadFloat(rdb);
|
||||||
long double ld = RedisModule_LoadLongDouble(rdb);
|
long double ld = RedisModule_LoadLongDouble(rdb);
|
||||||
if (RedisModule_IsIOError(rdb))
|
if (RedisModule_IsIOError(rdb)) {
|
||||||
|
RedisModuleCtx *ctx = RedisModule_GetContextFromIO(rdb);
|
||||||
|
RedisModule_FreeString(ctx, str);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
}
|
||||||
/* Using the values only after checking for io errors. */
|
/* Using the values only after checking for io errors. */
|
||||||
assert(count==1);
|
assert(count==1);
|
||||||
assert(encver==1);
|
assert(encver==1);
|
||||||
|
Loading…
Reference in New Issue
Block a user