mxfdemux: fix memory leak

Reset the internal segment before freeing it.

mxf_index_table_segment_parse() allocates data inside the segment
(like segment->delta_entries) which have to be freed using
mxf_index_table_segment_reset().

https://bugzilla.gnome.org/show_bug.cgi?id=746803
This commit is contained in:
Guillaume Desmottes 2015-03-26 11:52:33 +01:00 committed by Tim-Philipp Müller
parent 75c9a5f129
commit 4d790dae67

View file

@ -2048,11 +2048,13 @@ gst_mxf_demux_handle_index_table_segment (GstMXFDemux * demux,
(GCompareFunc) compare_index_table_segments);
/* Prevent duplicates */
if (l == NULL)
if (l == NULL) {
demux->pending_index_table_segments =
g_list_prepend (demux->pending_index_table_segments, segment);
else
} else {
mxf_index_table_segment_reset (segment);
g_free (segment);
}
return GST_FLOW_OK;
}