From 1066690b147f7238c0d061914f6f8990356105ff Mon Sep 17 00:00:00 2001 From: Havard Graff Date: Tue, 6 Jun 2017 10:39:15 +0200 Subject: [PATCH] audiodecoder: fix buffer leak in error code path --- gst-libs/gst/audio/gstaudiodecoder.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index 5dc6d49..435248a 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -1231,8 +1231,10 @@ gst_audio_decoder_finish_frame (GstAudioDecoder * dec, GstBuffer * buf, if (buf) { ret = check_pending_reconfigure (dec); - if (ret == GST_FLOW_FLUSHING || ret == GST_FLOW_NOT_NEGOTIATED) + if (ret == GST_FLOW_FLUSHING || ret == GST_FLOW_NOT_NEGOTIATED) { + gst_buffer_unref (buf); goto exit; + } if (priv->pending_events) send_pending_events (dec); -- 2.7.4