summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-03-25 20:28:41 +0000
committerLuiz Augusto von Dentz <luiz.dentz@openbossa.org>2008-03-25 20:28:41 +0000
commit9513c9f152909755d080f2ca65b8a7a109a9e946 (patch)
treec4b0f06801141bdbe03502f78d000755ba2a6b7f
parent0d34aea6ba9d77a06b8d7a80550c63287b0bbd60 (diff)
Fix g_free that may cause segmentation fault.
-rw-r--r--hcid/plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hcid/plugin.c b/hcid/plugin.c
index 1293e70f..b74108bd 100644
--- a/hcid/plugin.c
+++ b/hcid/plugin.c
@@ -78,12 +78,14 @@ gboolean plugin_init(void)
filename = g_build_filename(PLUGINDIR, file, NULL);
module = g_module_open(filename, 0);
- g_free(filename);
if (module == NULL) {
error("Can't load plugin %s", filename);
+ g_free(filename);
continue;
}
+ g_free(filename);
+
debug("%s", g_module_name(module));
if (g_module_symbol(module, "bluetooth_plugin_desc",