From 9d5d9897e5911e2e2916f0cf83a0f473a2290b7b Mon Sep 17 00:00:00 2001 From: James Stevenson Date: Fri, 22 Sep 2017 08:10:44 +0100 Subject: [PATCH] autoconvert: Fix two memory leaks on error conditions Both the sink_chain and sink_chain_list will neither pass or free the buffer if the internal src pad doesn't exist yet. https://bugzilla.gnome.org/show_bug.cgi?id=788035 --- gst/autoconvert/gstautoconvert.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst/autoconvert/gstautoconvert.c b/gst/autoconvert/gstautoconvert.c index bed5e88..5d3d565 100644 --- a/gst/autoconvert/gstautoconvert.c +++ b/gst/autoconvert/gstautoconvert.c @@ -923,6 +923,7 @@ gst_auto_convert_sink_chain (GstPad * pad, GstObject * parent, } else { GST_ERROR_OBJECT (autoconvert, "Got buffer without an negotiated element," " returning not-negotiated"); + gst_buffer_unref (buffer); } return ret; @@ -944,6 +945,7 @@ gst_auto_convert_sink_chain_list (GstPad * pad, GstObject * parent, } else { GST_ERROR_OBJECT (autoconvert, "Got buffer without an negotiated element," " returning not-negotiated"); + gst_buffer_list_unref (list); } return ret; -- 2.7.4