From 9a02dac2e8fa209f68b8e487313892cdd11c21a0 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 13 Jun 2016 09:45:53 +0200 Subject: [PATCH] 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. --- src/module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/module.c b/src/module.c index e64233b3..54f27907 100644 --- a/src/module.c +++ b/src/module.c @@ -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; }