From 0af74f53a3dfd5d4aa93326d5900b8562b019687 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 14 Oct 2008 17:55:52 +0200 Subject: [PATCH] Force symbol resolving and fix memory leak --- src/plugin.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugin.c b/src/plugin.c index 7cbd72b..0d90fd9 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -74,10 +74,11 @@ int __connman_plugin_init(void) filename = g_build_filename(PLUGINDIR, file, NULL); - handle = dlopen(filename, RTLD_LAZY); + handle = dlopen(filename, RTLD_NOW); if (handle == NULL) { g_warning("Can't load %s: %s", filename, dlerror()); + g_free(filename); continue; } @@ -85,7 +86,7 @@ int __connman_plugin_init(void) desc = dlsym(handle, "connman_plugin_desc"); if (desc == NULL) { - g_warning("Can't load symbol"); + g_warning("Can't load symbol: %s", dlerror()); dlclose(handle); continue; } -- 2.7.4