From: Doug Nazar Date: Wed, 26 Jun 2019 07:39:54 +0000 (-0400) Subject: audiodecoder: Fix leak on failed audio gaps X-Git-Tag: accepted/tizen/unified/20220217.153506~2^2~10^2~9^2~16^2~1^2~42^2~1^2~51 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53884bdcecfb86d861e3d16941d70a34f53daf7a;p=platform%2Fupstream%2Fgstreamer.git audiodecoder: Fix leak on failed audio gaps If we fail to process the gap event we need to unref the event or we end up with a leak. --- diff --git a/gst-libs/gst/audio/gstaudiodecoder.c b/gst-libs/gst/audio/gstaudiodecoder.c index ba6ebcc..15d8038 100644 --- a/gst-libs/gst/audio/gstaudiodecoder.c +++ b/gst-libs/gst/audio/gstaudiodecoder.c @@ -2225,6 +2225,7 @@ gst_audio_decoder_handle_gap (GstAudioDecoder * dec, GstEvent * event) GST_AUDIO_DECODER_STREAM_UNLOCK (dec); GST_ELEMENT_ERROR (dec, STREAM, FORMAT, (NULL), ("Decoder output not negotiated before GAP event.")); + gst_event_unref (event); return FALSE; } needs_reconfigure = TRUE; @@ -2273,6 +2274,7 @@ gst_audio_decoder_handle_gap (GstAudioDecoder * dec, GstEvent * event) ret = gst_audio_decoder_push_event (dec, event); } else { ret = FALSE; + gst_event_unref (event); } } return ret;