RedisModuleIO io;
moduleInitIOContext(io,mt,rdb,NULL,-1);
io.ver = 2;
/* Call the rdb_load method of the module providing the 10 bit
 * encoding version in the lower 10 bits of the module ID. */
if (mt->aux_load(&io,moduleid&1023, when) != REDISMODULE_OK || io.error) {
   moduleTypeNameByID(name,moduleid);
    serverLog(LL_WARNING,"The RDB file contains module AUX data for the module type '%s', that the responsible module is not able to load. Check for modules log above for additional clues.", name);
    goto eoferr;
}
if (io.ctx) {
    moduleFreeContext(io.ctx);
    zfree(io.ctx);
}

When mt->aux_load(&io,moduleid&1023, when) fails, previously-allocated io.ctx is lost.

A short description of the bug.

Reproduced within RediSearch sanitizer tests.

Steps to reproduce the behavior and/or a minimal code sample.

It's mostly a diagnostic problem, will fail Sanitizer/Valgrind.