diff options
author | Jimmy Ohn <yongjin.ohn@lge.com> | 2015-01-20 00:32:00 +0000 |
---|---|---|
committer | Thiago Santos <thiagoss@osg.samsung.com> | 2015-01-26 12:07:20 -0300 |
commit | bf10d33b9b95856aabbc12dfa7c5ede50a27b38c (patch) | |
tree | e69d9474d8af57fc618c32ab43f5e7c546a38cac | |
parent | 1e1580856337985bfef313f6f0e9218f514abb5e (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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/pulse/pulsesink.c b/ext/pulse/pulsesink.c index c20b0a0f8..abad2b806 100644 --- a/ext/pulse/pulsesink.c +++ b/ext/pulse/pulsesink.c @@ -2164,13 +2164,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; } |