fix crash in module short read test
This commit is contained in:
parent
4092a75d85
commit
5661b19005
@ -20,6 +20,7 @@ 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);
|
||||||
|
if (str)
|
||||||
RedisModule_FreeString(ctx, str);
|
RedisModule_FreeString(ctx, str);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user