Merge pull request #3826 from charsyam/feature/fix_dlopen_leak

fix missed dlclose leak in module.c
This commit is contained in:
Salvatore Sanfilippo 2018-03-22 09:19:26 +01:00 committed by GitHub
commit 7acf0e0a18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);