Commit 9a02dac2 authored by antirez's avatar antirez
Browse files

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