[vlc-devel] commit: input: Fix a memleak. ( Rémi Duraffort )

git version control git at videolan.org
Thu May 14 22:34:25 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Duraffort <ivoire at videolan.org> | Thu May 14 19:27:30 2009 +0200| [f63268acaafdca4f3e17b837c37a105c01739c0f] | committer: Rémi Duraffort 

input: Fix a memleak.

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

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

diff --git a/src/input/input.c b/src/input/input.c
index 396994b..aeeebe8 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -1107,13 +1107,11 @@ static void InitPrograms( input_thread_t * p_input )
     /* Set up es_out */
     es_out_Control( p_input->p->p_es_out, ES_OUT_SET_ACTIVE, true );
     i_es_out_mode = ES_OUT_MODE_AUTO;
-    val.p_list = NULL;
     if( p_input->p->p_sout )
     {
         if( var_GetBool( p_input, "sout-all" ) )
         {
             i_es_out_mode = ES_OUT_MODE_ALL;
-            val.p_list = NULL;
         }
         else
         {
@@ -1125,8 +1123,7 @@ static void InitPrograms( input_thread_t * p_input )
             }
             else
             {
-                var_Change( p_input, "programs", VLC_VAR_FREELIST, &val,
-                            NULL );
+                var_Change( p_input, "programs", VLC_VAR_FREELIST, &val, NULL );
             }
         }
     }
@@ -1141,6 +1138,7 @@ static void InitPrograms( input_thread_t * p_input )
     {
         demux_Control( p_input->p->input.p_demux, DEMUX_SET_GROUP, -1,
                         val.p_list );
+        var_Change( p_input, "programs", VLC_VAR_FREELIST, &val, NULL );
     }
     else
     {




More information about the vlc-devel mailing list