From: He Junyan Date: Tue, 3 Jan 2023 09:28:18 +0000 (+0800) Subject: h265decoder: Fix a memory leak because of slice header. X-Git-Tag: 1.22.0~97 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1eeea942de79aac826ab85c5bc3ab862eb0089cc;p=platform%2Fupstream%2Fgstreamer.git h265decoder: Fix a memory leak because of slice header. The gst_h265_slice_hdr_free() should free the slice header just parsed, not the priv->current_slice. Or, the memory leak will happen because we do not free the slices in priv->nalu list. Part-of: --- diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c index 723697c..4731300 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/codecs/gsth265decoder.c @@ -830,7 +830,7 @@ gst_h265_decoder_parse_slice (GstH265Decoder * self, GstH265NalUnit * nalu) * GstH265SliceHdr::entry_point_offset_minus1 but we don't use it * in this h265decoder baseclass at the moment */ - gst_h265_slice_hdr_free (&priv->current_slice.header); + gst_h265_slice_hdr_free (&slice.header); slice.nalu = *nalu; if (nalu->type >= GST_H265_NAL_SLICE_BLA_W_LP &&