Diff between e28829b44af3250063e728bdcfc3fcdc86e3ab83 and 1985137b8d20858948ba83020b911f864bc7faad
Changed Files
| File | Additions | Deletions | Status |
| obexd/src/plugin.c | +3 | -5 | modified |
Full Patch
diff --git a/obexd/src/plugin.c b/obexd/src/plugin.c
index 37b2df0..13dda96 100644
--- a/obexd/src/plugin.c
+++ b/obexd/src/plugin.c
@@ -46,6 +46,9 @@ static gboolean add_plugin(void *handle, struct obex_plugin_desc *desc)
{
struct obex_plugin *plugin;
+ if (desc->init == NULL)
+ return FALSE;
+
plugin = g_try_new0(struct obex_plugin, 1);
if (plugin == NULL)
return FALSE;
@@ -113,11 +116,6 @@ gboolean plugin_init(void)
continue;
}
- if (desc->init == NULL) {
- dlclose(handle);
- continue;
- }
-
if (add_plugin(handle, desc) == FALSE)
dlclose(handle);
}