[vlc-devel] commit: Fix memory leak (CID 95) ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat May 31 22:07:33 CEST 2008


vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat May 31 23:09:10 2008 +0300| [90ab070189879c021ab380e9505aeb25e1e6e8ee]

Fix memory leak (CID 95)

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

 src/input/vlmshell.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/input/vlmshell.c b/src/input/vlmshell.c
index a3ce654..90c59d9 100644
--- a/src/input/vlmshell.c
+++ b/src/input/vlmshell.c
@@ -968,17 +968,12 @@ vlm_media_sys_t *vlm_MediaSearch( vlm_t *vlm, const char *psz_name )
  *****************************************************************************/
 static vlm_schedule_sys_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name )
 {
-    vlm_schedule_sys_t *p_sched = malloc( sizeof( vlm_schedule_sys_t ) );
-
-    if( !p_sched )
-    {
+    if( !psz_name )
         return NULL;
-    }
 
-    if( !psz_name )
-    {
+    vlm_schedule_sys_t *p_sched = malloc( sizeof( vlm_schedule_sys_t ) );
+    if( !p_sched )
         return NULL;
-    }
 
     p_sched->psz_name = strdup( psz_name );
     p_sched->b_enabled = false;




More information about the vlc-devel mailing list