From 98724dbfa33099bba07ba8951950a14303e763cc Mon Sep 17 00:00:00 2001 From: Debarshi Ray Date: Sun, 25 Mar 2012 13:17:53 +0200 Subject: streamed-media-window: don't leak the element name Fixes: https://bugzilla.gnome.org/672796 --- src/empathy-streamed-media-window.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/empathy-streamed-media-window.c') diff --git a/src/empathy-streamed-media-window.c b/src/empathy-streamed-media-window.c index 87887e75f..deaae10d6 100644 --- a/src/empathy-streamed-media-window.c +++ b/src/empathy-streamed-media-window.c @@ -2625,14 +2625,15 @@ empathy_streamed_media_window_bus_message (GstBus *bus, GstMessage *message, GError *error = NULL; GstElement *gst_error; gchar *debug; + gchar *name; gst_message_parse_error (message, &error, &debug); gst_error = GST_ELEMENT (GST_MESSAGE_SRC (message)); g_message ("Element error: %s -- %s\n", error->message, debug); - if (g_str_has_prefix (gst_element_get_name (gst_error), - VIDEO_INPUT_ERROR_PREFIX)) + name = gst_element_get_name (gst_error); + if (g_str_has_prefix (name, VIDEO_INPUT_ERROR_PREFIX)) { /* Remove the video input and continue */ if (priv->video_input != NULL) @@ -2643,6 +2644,7 @@ empathy_streamed_media_window_bus_message (GstBus *bus, GstMessage *message, { empathy_streamed_media_window_disconnected (self, TRUE); } + g_free (name); g_error_free (error); g_free (debug); } -- cgit v1.2.3