[vlc-commits] input: fix leak with 0 titles arrays

Francois Cartegnie git at videolan.org
Wed Jan 8 19:29:48 CET 2020


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Wed Jan  8 11:02:56 2020 +0100| [f2ffad6b421b40e5a45eb613c4477b578b2aabc1] | committer: Francois Cartegnie

input: fix leak with 0 titles arrays

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

 src/input/input.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/input/input.c b/src/input/input.c
index 977c230b23..7ba4f0d9f9 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -2387,8 +2387,8 @@ static void UpdateTitleListfromDemux( input_thread_t *p_input )
     {
         for( int i = 0; i < in->i_title; i++ )
             vlc_input_title_Delete( in->title[i] );
-        TAB_CLEAN( in->i_title, in->title );
     }
+    TAB_CLEAN( in->i_title, in->title );
 
     /* Get the new title list */
     if( demux_Control( in->p_demux, DEMUX_GET_TITLE_INFO,
@@ -2726,8 +2726,8 @@ static void InputSourceDestroy( input_source_t *in )
     {
         for( i = 0; i < in->i_title; i++ )
             vlc_input_title_Delete( in->title[i] );
-        TAB_CLEAN( in->i_title, in->title );
     }
+    TAB_CLEAN( in->i_title, in->title );
 
     free( in );
 }



More information about the vlc-commits mailing list