mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-10 01:54:11 +00:00
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:
parent
75c9a5f129
commit
4d790dae67
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue