[telepathy-mission-control/master] McdClient: don't leak the links from filter lists

Simon McVittie simon.mcvittie at collabora.co.uk
Tue May 26 10:05:26 PDT 2009


---
 src/mcd-dispatcher.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/mcd-dispatcher.c b/src/mcd-dispatcher.c
index 9e3993e..9aa3e6b 100644
--- a/src/mcd-dispatcher.c
+++ b/src/mcd-dispatcher.c
@@ -353,10 +353,18 @@ mcd_client_free (McdClient *client)
 
     g_list_foreach (client->approver_filters,
                     (GFunc)g_hash_table_destroy, NULL);
+    g_list_free (client->approver_filters);
+    client->approver_filters = NULL;
+
     g_list_foreach (client->handler_filters,
                     (GFunc)g_hash_table_destroy, NULL);
+    g_list_free (client->handler_filters);
+    client->handler_filters = NULL;
+
     g_list_foreach (client->observer_filters,
                     (GFunc)g_hash_table_destroy, NULL);
+    g_list_free (client->observer_filters);
+    client->observer_filters = NULL;
 
     g_slice_free (McdClient, client);
 }
-- 
1.5.6.5




More information about the telepathy-commits mailing list