summaryrefslogtreecommitdiff
path: root/src/plugin.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-10-14 17:55:52 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-10-14 17:55:52 +0200
commit0af74f53a3dfd5d4aa93326d5900b8562b019687 (patch)
treedc21037d5a48e922b094455856a348311e04c7fe /src/plugin.c
parent2ad81f8d0508e33cbace70a591d5fdd96b21c5e7 (diff)
downloadconnman-0af74f53a3dfd5d4aa93326d5900b8562b019687.tar.gz
connman-0af74f53a3dfd5d4aa93326d5900b8562b019687.tar.bz2
connman-0af74f53a3dfd5d4aa93326d5900b8562b019687.zip
Force symbol resolving and fix memory leak
Diffstat (limited to 'src/plugin.c')
-rw-r--r--src/plugin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/plugin.c b/src/plugin.c
index 7cbd72b9..0d90fd9f 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;
}