summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimmy Ohn <yongjin.ohn@lge.com>2015-01-20 00:32:00 +0000
committerThiago Santos <thiagoss@osg.samsung.com>2015-01-26 12:14:54 -0300
commit56f5ae3f089e13b2593a52ec8fb22168dae96144 (patch)
treeb7f6e85d34f2cfa05c64c51d43373d68d4ccfbe8
parentab60576c97d200cfac626e3f6e5d5efa440939ef (diff)
pulsesink: Free format_info in query_getcaps
If we can not create probe stream in query_getcaps function, it will appear memory leakage from format info. The following patch prevent memory leakage in pulsesink. https://bugzilla.gnome.org/show_bug.cgi?id=743178
-rw-r--r--ext/pulse/pulsesink.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c
index 28ea8569e..8d54d995a 100644
--- a/ext/pulse/pulsesink.c
+++ b/ext/pulse/pulsesink.c
@@ -2158,13 +2158,14 @@ gst_pulsesink_query_getcaps (GstPulseSink * psink, GstCaps * filter)
pbuf->probe_stream = gst_pulsesink_create_probe_stream (psink, pbuf,
format);
+
+ pa_format_info_free (format);
+
if (!pbuf->probe_stream) {
GST_WARNING_OBJECT (psink, "Could not create probe stream");
goto unlock;
}
- pa_format_info_free (format);
-
stream = pbuf->probe_stream;
}