From 9ca306d22c90fe498433c37ee2e688f3350d8600 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Wed, 12 Oct 2022 11:12:14 +0200 Subject: [PATCH] mxfdemux: Don't leak index table segments on failures The segment was freed ... but not the contents :) Part-of: --- subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c b/subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c index f9d9a69..d9eb9a5 100644 --- a/subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c +++ b/subprojects/gst-plugins-bad/gst/mxf/mxfdemux.c @@ -3372,6 +3372,7 @@ gst_mxf_demux_handle_index_table_segment (GstMXFDemux * demux, GstMXFKLV * klv) if (g_list_find_custom (demux->pending_index_table_segments, segment, (GCompareFunc) compare_index_table_segment)) { GST_DEBUG_OBJECT (demux, "Already in pending list"); + mxf_index_table_segment_reset (segment); g_free (segment); return GST_FLOW_OK; } @@ -3380,6 +3381,7 @@ gst_mxf_demux_handle_index_table_segment (GstMXFDemux * demux, GstMXFKLV * klv) if (g_array_binary_search (table->segments, segment, (GCompareFunc) compare_index_table_segment, NULL)) { GST_DEBUG_OBJECT (demux, "Already handled"); + mxf_index_table_segment_reset (segment); g_free (segment); return GST_FLOW_OK; } -- 2.7.4