[vlc-commits] vlm: memory leak

Rémi Denis-Courmont git at videolan.org
Mon Nov 17 18:03:27 CET 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Nov 17 19:03:20 2014 +0200| [69d88103742805089135f37bdc6522e238fb1053] | committer: Rémi Denis-Courmont

vlm: memory leak

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

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

diff --git a/src/input/vlmshell.c b/src/input/vlmshell.c
index 50a3859..9c25434 100644
--- a/src/input/vlmshell.c
+++ b/src/input/vlmshell.c
@@ -602,7 +602,7 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
             if( ++i >= i_property )
                 break;
 
-            psz_line = strdup( ppsz_property[i] );
+            psz_line = xstrdup( ppsz_property[i] );
             for( j = i+1; j < i_property; j++ )
             {
                 psz_line = xrealloc( psz_line,
@@ -611,7 +611,9 @@ static int ExecuteScheduleProperty( vlm_t *p_vlm, vlm_schedule_sys_t *p_schedule
                 strcat( psz_line, ppsz_property[j] );
             }
 
-            if( vlm_ScheduleSetup( p_schedule, "append", psz_line ) )
+            int val = vlm_ScheduleSetup( p_schedule, "append", psz_line );
+            free( psz_line );
+            if( val )
                 goto error;
             break;
         }



More information about the vlc-commits mailing list