Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
804bb118 by Steve Lhomme at 2026-01-09T03:12:31+00:00
demux: mkv: avoid leaking elements we overwrite
Unless they are marked as for keeps.
Fixes #29519
- - - - -
1 changed file:
- modules/demux/mkv/Ebml_parser.cpp
Changes:
=====================================
modules/demux/mkv/Ebml_parser.cpp
=====================================
@@ -197,6 +197,14 @@ next:
if (do_read)
{
+ // avoid leaking previous element at the level we're reading
+ if(m_el[mi_level] != nullptr && !mb_keep)
+ {
+ assert(m_el[mi_level] == p_prev);
+ delete m_el[mi_level];
+ p_prev = nullptr;
+ }
+
// If the parent is a segment, use the segment context when creating
children
// (to prolong their lifetime), otherwise just continue as normal
EbmlSemanticContext e_context =
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/804bb1183da64866704d2aef79003af59784813b
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/804bb1183da64866704d2aef79003af59784813b
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance_______________________________________________
vlc-commits mailing list
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits