[vlc-devel] [PATCH] demux: mkv: fix memory leak

Shaleen Jain shaleen.jain95 at gmail.com
Mon Jul 24 08:33:45 CEST 2017


This is initialized by es_format_Init as NULL

Initializing it here leads to a leak since es_format_Init
makes no attempt to free a previous declaration since it assumes
it to be uninitialized.
---
 modules/demux/mkv/mkv.hpp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index 5439df5d15..ce9bfec347 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -214,7 +214,6 @@ class mkv_track_t
         {
             std::memset( &fmt, 0, sizeof( fmt ) );
             std::memset( &pi_chan_table, 0, sizeof( pi_chan_table ) );
-            fmt.psz_language = strdup("English");
         }
 
         typedef unsigned int track_id_t;
-- 
2.13.3



More information about the vlc-devel mailing list