Unverified Commit 89849c8b authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #6638 from oranagra/fix_module_short_read_test

fix crash in module short read test
parents 4092a75d 5661b190
......@@ -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. */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment