mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Merge pull request #6638 from oranagra/fix_module_short_read_test
fix crash in module short read test
This commit is contained in:
commit
89849c8b01
@ -20,7 +20,8 @@ void *testrdb_type_load(RedisModuleIO *rdb, int encver) {
|
|||||||
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);
|
RedisModuleCtx *ctx = RedisModule_GetContextFromIO(rdb);
|
||||||
RedisModule_FreeString(ctx, str);
|
if (str)
|
||||||
|
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. */
|
||||||
|
Loading…
Reference in New Issue
Block a user