[Telepathy-commits] [telepathy-stream-engine/master] Fix leak

Olivier Crête olivier.crete at collabora.co.uk
Wed Feb 11 07:58:21 PST 2009


Based on a suggestion by Alban Crequy
---
 src/tp-stream-engine.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/tp-stream-engine.c b/src/tp-stream-engine.c
index a1b6445..e5f37e6 100644
--- a/src/tp-stream-engine.c
+++ b/src/tp-stream-engine.c
@@ -778,7 +778,7 @@ bus_async_handler (GstBus *bus G_GNUC_UNUSED,
   gchar *error_string;
   guint i;
   GstElement *source = GST_ELEMENT (GST_MESSAGE_SRC (message));
-  gchar *name = gst_element_get_name (source);
+  gchar *name = NULL;
 
 
   for (i = 0; i < priv->channels->len; i++)
@@ -786,6 +786,8 @@ bus_async_handler (GstBus *bus G_GNUC_UNUSED,
             g_ptr_array_index (priv->channels, i), message))
       return TRUE;
 
+  name = gst_element_get_name (source);
+
   switch (GST_MESSAGE_TYPE (message))
     {
       case GST_MESSAGE_ERROR:
-- 
1.5.6.5



More information about the telepathy-commits mailing list