[grilo] core: Free plugin data in the registry's plugin unload function.



commit 4ae19da7d5ea231b1cc1641c1eb03b01ee658c79
Author: Iago Toral Quiroga <itoral igalia com>
Date:   Fri Sep 3 11:07:26 2010 +0200

    core: Free plugin data in the registry's plugin unload function.

 src/grl-plugin-registry.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/grl-plugin-registry.c b/src/grl-plugin-registry.c
index 5b9af12..777692a 100644
--- a/src/grl-plugin-registry.c
+++ b/src/grl-plugin-registry.c
@@ -124,7 +124,8 @@ grl_plugin_registry_init (GrlPluginRegistry *registry)
 
   registry->priv->configs =
     g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref);
-  registry->priv->plugins = g_hash_table_new (g_str_hash, g_str_equal);
+  registry->priv->plugins =
+    g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_free);
   registry->priv->sources =
     g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
   registry->priv->system_keys =
@@ -668,6 +669,12 @@ grl_plugin_registry_unload (GrlPluginRegistry *registry,
   if (plugin->plugin_deinit) {
     plugin->plugin_deinit ();
   }
+
+  g_free (plugin->info.filename);
+  if (plugin->info.optional_info) {
+    g_hash_table_destroy (plugin->info.optional_info);
+  }
+
   if (plugin->module) {
     g_module_close (plugin->module);
   }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]