empathy r2758 - trunk/libempathy



Author: xclaesse
Date: Fri Apr  3 12:50:01 2009
New Revision: 2758
URL: http://svn.gnome.org/viewvc/empathy?rev=2758&view=rev

Log:
Free the capabilities array. Fixes bug #577826

From: Xavier Claessens <xclaesse gmail com>

Modified:
   trunk/libempathy/empathy-dispatcher.c

Modified: trunk/libempathy/empathy-dispatcher.c
==============================================================================
--- trunk/libempathy/empathy-dispatcher.c	(original)
+++ trunk/libempathy/empathy-dispatcher.c	Fri Apr  3 12:50:01 2009
@@ -830,7 +830,6 @@
     }
 
   /* Advertise VoIP capabilities */
-  /* FIXME: Capabilities is leaked */
   capabilities = g_ptr_array_sized_new (1);
   cap_type = dbus_g_type_get_struct ("GValueArray", G_TYPE_STRING,
     G_TYPE_UINT, G_TYPE_INVALID);
@@ -848,6 +847,9 @@
     connection, -1, capabilities, &remove,
     dispatcher_connection_advertise_capabilities_cb,
     NULL, NULL, G_OBJECT (dispatcher));
+
+  g_value_unset (&cap);
+  g_ptr_array_free (capabilities, TRUE);
 }
 
 static void



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