--- a/gplugin/gplugin-manager.c Mon Mar 09 23:18:47 2020 -0500
+++ b/gplugin/gplugin-manager.c Mon Mar 09 23:19:03 2020 -0500
@@ -509,14 +509,11 @@
manager->loaders_by_extension,
+ if(!GPLUGIN_IS_LOADER(l->data)) { loader = GPLUGIN_LOADER(l->data);
- if(!GPLUGIN_IS_LOADER(loader)) {
/* Try to probe the plugin with the current loader */
@@ -525,7 +522,7 @@
/* Check the GError, if it's set, output its message and
- if(plugin == NULL || error) {
error_message = g_strdup_printf(
@@ -587,8 +584,12 @@
error_message = g_strdup_printf(
_("Plugin %s has a NULL id."),
+ g_object_unref(G_OBJECT(info)); g_list_prepend(error_messages, error_message);
@@ -658,6 +659,11 @@
g_object_unref(G_OBJECT(info));
+ /* since the plugin is now stored in our hash tables we + * need to remove this function's reference to it. + g_object_unref(G_OBJECT(plugin)); @@ -854,12 +860,15 @@
/* now try to get the plugin info from the plugin */
info = gplugin_plugin_get_info(plugin);
+ gchar *filename = gplugin_plugin_get_filename(plugin); _("Plugin %s did not return value plugin info"),
- gplugin_plugin_get_filename(plugin));
gplugin_plugin_set_state(plugin, GPLUGIN_PLUGIN_STATE_LOAD_FAILED);
@@ -878,13 +887,16 @@
loader = gplugin_plugin_get_loader(plugin);
if(!GPLUGIN_IS_LOADER(loader)) {
+ gchar *filename = gplugin_plugin_get_filename(plugin); _("The loader for %s is not a loader. This "
- gplugin_plugin_get_filename(plugin));
gplugin_plugin_set_state(plugin, GPLUGIN_PLUGIN_STATE_LOAD_FAILED);
--- a/gplugin/gplugin-native-loader.c Mon Mar 09 23:18:47 2020 -0500
+++ b/gplugin/gplugin-native-loader.c Mon Mar 09 23:19:03 2020 -0500
@@ -241,9 +241,6 @@
- /* claim ownership of the info object */
- g_object_ref_sink(G_OBJECT(info));
/* now create the actual plugin instance */
@@ -261,6 +258,7 @@
g_object_unref(G_OBJECT(info));
if(!GPLUGIN_IS_NATIVE_PLUGIN(plugin)) {
+ g_module_close(module); @@ -311,10 +309,12 @@
/* validate the function */
- const char *filename = gplugin_plugin_get_filename(plugin);
+ gchar *filename = gplugin_plugin_get_filename(plugin); g_warning(_("unload function for %s is NULL"), filename);
--- a/gplugin/gplugin-native-plugin.c Mon Mar 09 23:18:47 2020 -0500
+++ b/gplugin/gplugin-native-plugin.c Mon Mar 09 23:19:03 2020 -0500
@@ -196,6 +196,8 @@
g_clear_object(&plugin->loader);
g_clear_object(&plugin->info);
+ g_module_close(plugin->module); G_OBJECT_CLASS(gplugin_native_plugin_parent_class)->finalize(obj);