[vinagre] Fix a memory leak
- From: Jonh Wendell <jwendell src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [vinagre] Fix a memory leak
- Date: Thu, 29 Oct 2009 00:43:48 +0000 (UTC)
commit bb3a9de014d737e7e7efbbb49673c8a916e0ca8b
Author: Jonh Wendell <jwendell gnome org>
Date: Wed Oct 28 11:52:43 2009 -0300
Fix a memory leak
vinagre/vinagre-plugins-engine.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/vinagre/vinagre-plugins-engine.c b/vinagre/vinagre-plugins-engine.c
index a8d4047..e441b58 100644
--- a/vinagre/vinagre-plugins-engine.c
+++ b/vinagre/vinagre-plugins-engine.c
@@ -260,6 +260,12 @@ add_loader (VinagrePluginsEngine *engine,
}
static void
+free_plugin_list (gpointer data, gpointer user_data G_GNUC_UNUSED)
+{
+ g_free (data);
+}
+
+static void
activate_engine_plugins (VinagrePluginsEngine *engine)
{
GSList *active_plugins, *l;
@@ -282,6 +288,9 @@ activate_engine_plugins (VinagrePluginsEngine *engine)
if (vinagre_plugin_info_is_engine (info))
vinagre_plugins_engine_activate_plugin (engine, info);
}
+
+ g_slist_foreach (active_plugins, free_plugin_list, NULL);
+ g_slist_free (active_plugins);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]