Unverified Commit 7acf0e0a authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo Committed by GitHub
Browse files

Merge pull request #3826 from charsyam/feature/fix_dlopen_leak

fix missed dlclose leak in module.c
parents da621783 51a03f63
...@@ -3939,6 +3939,7 @@ int moduleLoad(const char *path, void **module_argv, int module_argc) { ...@@ -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"); onload = (int (*)(void *, void **, int))(unsigned long) dlsym(handle,"RedisModule_OnLoad");
if (onload == NULL) { if (onload == NULL) {
dlclose(handle);
serverLog(LL_WARNING, serverLog(LL_WARNING,
"Module %s does not export RedisModule_OnLoad() " "Module %s does not export RedisModule_OnLoad() "
"symbol. Module not loaded.",path); "symbol. Module not loaded.",path);
......
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