[vlc-commits] substtml: Fix memory leak

Hugo Beauzée-Luyssen git at videolan.org
Thu Sep 15 14:07:20 CEST 2016


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Thu Sep 15 14:07:04 2016 +0200| [9c9f6861b01208d4ea61ebd910ce8867a6239019] | committer: Hugo Beauzée-Luyssen

substtml: Fix memory leak

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

 modules/codec/substtml.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/codec/substtml.c b/modules/codec/substtml.c
index e3e8cba..2a0d23b 100644
--- a/modules/codec/substtml.c
+++ b/modules/codec/substtml.c
@@ -181,6 +181,7 @@ static void PopStyle( style_stack_t** pp_stack )
     if( *pp_stack == NULL )
         return;
     style_stack_t* p_next = (*pp_stack)->p_next;
+    CleanupStyle( (*pp_stack)->p_style );
     free( *pp_stack );
     *pp_stack = p_next;
 }
@@ -190,6 +191,7 @@ static void ClearStack( style_stack_t* p_stack )
     while( p_stack != NULL )
     {
         style_stack_t* p_next = p_stack->p_next;
+        CleanupStyle( p_stack->p_style );
         free( p_stack );
         p_stack = p_next;
     }



More information about the vlc-commits mailing list