mirror of
https://github.com/redis/redis.git
synced 2026-06-08 16:24:26 -04:00
fix crash in module short read test
This commit is contained in:
parent
4092a75d85
commit
5661b19005
1 changed files with 2 additions and 1 deletions
|
|
@ -20,7 +20,8 @@ void *testrdb_type_load(RedisModuleIO *rdb, int encver) {
|
|||
long double ld = RedisModule_LoadLongDouble(rdb);
|
||||
if (RedisModule_IsIOError(rdb)) {
|
||||
RedisModuleCtx *ctx = RedisModule_GetContextFromIO(rdb);
|
||||
RedisModule_FreeString(ctx, str);
|
||||
if (str)
|
||||
RedisModule_FreeString(ctx, str);
|
||||
return NULL;
|
||||
}
|
||||
/* Using the values only after checking for io errors. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue