summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVivek Dasmohapatra <vivek@collabora.co.uk>2011-07-22 12:24:34 +0100
committerVivek Dasmohapatra <vivek@collabora.co.uk>2011-07-22 12:24:34 +0100
commitaae2f108921f4a8eedd861f76e8650c128e2d0cc (patch)
treeaf36210d21ccea093df34db2389e5965cfdba015
parent260719888571da3c2e0ebcdc9fc5f45f298c02cb (diff)
parent07e875ab4a41add247b4127470be6e45a3530e82 (diff)
downloadtelepathy-mission-control-aae2f108921f4a8eedd861f76e8650c128e2d0cc.tar.gz
Merge branch 'cdo-satisfied-requests-hash-leak' into telepathy-mission-control-5.8+
Conflicts: NEWS
-rw-r--r--NEWS6
-rw-r--r--src/mcd-dispatch-operation.c12
2 files changed, 13 insertions, 5 deletions
diff --git a/NEWS b/NEWS
index 0885ec2f..85f46817 100644
--- a/NEWS
+++ b/NEWS
@@ -30,6 +30,12 @@ Fixes:
• Some files were missing G_END_DECLS, which broke C++ includes (fledermaus)
+Enhancements:
+
+• Centralised debug control for MCP plugins via MCP_DEBUG environment
+ variable (and macro + flags so out-of-tree plugins can take advantage
+ of same) (fledermaus)
+
telepathy-mission-control 5.7.11 (2011-05-11)
============================================
diff --git a/src/mcd-dispatch-operation.c b/src/mcd-dispatch-operation.c
index cb1e83a3..a2b60666 100644
--- a/src/mcd-dispatch-operation.c
+++ b/src/mcd-dispatch-operation.c
@@ -2009,8 +2009,10 @@ collect_satisfied_requests (const GList *channels,
}
satisfied_requests = g_ptr_array_sized_new (g_hash_table_size (set));
+ g_ptr_array_set_free_func (satisfied_requests, g_free);
+
request_properties = g_hash_table_new_full (g_str_hash, g_str_equal,
- NULL, (GDestroyNotify) g_hash_table_unref);
+ g_free, (GDestroyNotify) g_hash_table_unref);
g_hash_table_iter_init (&it, set);
@@ -2018,12 +2020,14 @@ collect_satisfied_requests (const GList *channels,
{
GHashTable *props;
- g_ptr_array_add (satisfied_requests, path);
+ g_ptr_array_add (satisfied_requests, g_strdup (path));
props = _mcd_request_dup_immutable_properties (value);
g_assert (props != NULL);
- g_hash_table_insert (request_properties, path, props);
+ g_hash_table_insert (request_properties, g_strdup (path), props);
}
+ g_hash_table_unref (set);
+
if (paths_out != NULL)
*paths_out = satisfied_requests;
else
@@ -2110,8 +2114,6 @@ _mcd_dispatch_operation_run_observers (McdDispatchOperation *self)
observe_channels_cb,
g_object_ref (self), g_object_unref, NULL);
- /* don't free the individual object paths, which are borrowed from the
- * McdChannel objects */
g_ptr_array_unref (satisfied_requests);
_mcd_tp_channel_details_free (channels_array);