From 51a03f6356973a45e3ff7baa675a3e8f2a1be6f9 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 8eb3f8aa..e8af8e3f 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);