Free module context after loading.

Now that modules receive RedisModuleString objects on loading, they are
allowed to call the String API, so the context must be released
correctly.

Related to #3293.
This commit is contained in:
antirez 2016-06-13 09:45:53 +02:00
parent b6cd008508
commit 9a02dac2e8

View File

@ -2946,6 +2946,7 @@ int moduleLoad(const char *path, void **module_argv, int module_argc) {
dictAdd(modules,ctx.module->name,ctx.module);
ctx.module->handle = handle;
serverLog(LL_NOTICE,"Module '%s' loaded from %s",ctx.module->name,path);
moduleFreeContext(&ctx);
return C_OK;
}