summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2016-05-20 16:47:35 +0300
committerTim-Philipp Müller <tim@centricular.com>2016-05-20 17:40:26 +0100
commit6fd04b07fca81acf598b1695033bea4e72c32560 (patch)
treedb4cf2a3c2c8faa7696d788ae0342a6531ce4796 /ext
parent7cd9d34c80d9dace2671db4fb24ff19ca71c2584 (diff)
downloadgstreamer-plugins-good-6fd04b07fca81acf598b1695033bea4e72c32560.tar.gz
souphttpsrc: fix buffer leak when flushing
When early returning in gst_soup_http_src_read_buffer() because the element is FLUSHING, we need to unmap and unref the buffer which was just created. https://bugzilla.gnome.org/show_bug.cgi?id=766718
Diffstat (limited to 'ext')
-rw-r--r--ext/soup/gstsouphttpsrc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/soup/gstsouphttpsrc.c b/ext/soup/gstsouphttpsrc.c
index 08d6cb515..0bd51a147 100644
--- a/ext/soup/gstsouphttpsrc.c
+++ b/ext/soup/gstsouphttpsrc.c
@@ -1570,6 +1570,8 @@ gst_soup_http_src_read_buffer (GstSoupHTTPSrc * src, GstBuffer ** outbuf)
g_mutex_lock (&src->mutex);
if (g_cancellable_is_cancelled (src->cancellable)) {
+ gst_buffer_unmap (*outbuf, &mapinfo);
+ gst_buffer_unref (*outbuf);
g_mutex_unlock (&src->mutex);
return GST_FLOW_FLUSHING;
}