[vlc-commits] demux:mkv: do not try to use p_prev if it's already free'd

Steve Lhomme git at videolan.org
Tue Nov 14 10:55:04 CET 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Nov 13 18:08:43 2017 +0100| [d53561358736091f1eca7ea4b9fd0f52a6ddd255] | committer: Jean-Baptiste Kempf

demux:mkv: do not try to use p_prev if it's already free'd

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d53561358736091f1eca7ea4b9fd0f52a6ddd255
---

 modules/demux/mkv/Ebml_parser.cpp | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
index 489ff67355..e22e68c5e6 100644
--- a/modules/demux/mkv/Ebml_parser.cpp
+++ b/modules/demux/mkv/Ebml_parser.cpp
@@ -178,6 +178,7 @@ EbmlElement *EbmlParser::Get( int n_call )
                 if( MKV_IS_ID( p_prev, KaxBlockVirtual ) )
                     static_cast<KaxBlockVirtualWorkaround*>(p_prev)->Fix(); // !! WARNING : TODO !! this is undefined-behavior
                 delete p_prev;
+                p_prev = NULL;
             }
             mb_keep = false;
         }



More information about the vlc-commits mailing list