[Telepathy-commits] [telepathy-salut/master] d_bus_names_changed_removed: don't leak the arrays if handle_type == TP_HANDLE_TYPE_CONTACT
Guillaume Desmottes
guillaume.desmottes at collabora.co.uk
Wed Dec 17 10:01:39 PST 2008
---
src/salut-tubes-channel.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/salut-tubes-channel.c b/src/salut-tubes-channel.c
index e4d08a5..9f088f3 100644
--- a/src/salut-tubes-channel.c
+++ b/src/salut-tubes-channel.c
@@ -588,12 +588,15 @@ d_bus_names_changed_removed (SalutTubesChannel *self,
TpHandle contact)
{
SalutTubesChannelPrivate *priv = SALUT_TUBES_CHANNEL_GET_PRIVATE (self);
- GPtrArray *added = g_ptr_array_new ();
- GArray *removed = g_array_new (FALSE, FALSE, sizeof (guint));
+ GPtrArray *added;
+ GArray *removed;
if (priv->handle_type == TP_HANDLE_TYPE_CONTACT)
return;
+ added = g_ptr_array_new ();
+ removed = g_array_new (FALSE, FALSE, sizeof (guint));
+
g_array_append_val (removed, contact);
tp_svc_channel_type_tubes_emit_d_bus_names_changed (self,
--
1.5.6.5
More information about the Telepathy-commits
mailing list