From 063e4b44c04f29544812409718daca142a9cc324 Mon Sep 17 00:00:00 2001 From: charsyam Date: Wed, 22 Feb 2017 14:26:21 +0900 Subject: [PATCH] fix dlopen leak --- src/module.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/module.c b/src/module.c index 8eb3f8aa5..e8af8e3ff 100644 --- a/src/module.c +++ b/src/module.c @@ -3939,6 +3939,7 @@ int moduleLoad(const char *path, void **module_argv, int module_argc) { } onload = (int (*)(void *, void **, int))(unsigned long) dlsym(handle,"RedisModule_OnLoad"); if (onload == NULL) { + dlclose(handle); serverLog(LL_WARNING, "Module %s does not export RedisModule_OnLoad() " "symbol. Module not loaded.",path);