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

git version control git at videolan.org
Sat May 31 22:08:42 CEST 2008


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

Fix memory leak (CID 95)

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

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

diff --git a/src/misc/vlm.c b/src/misc/vlm.c
index cf1761b..651a5d0 100644
--- a/src/misc/vlm.c
+++ b/src/misc/vlm.c
@@ -1368,17 +1368,12 @@ static int64_t vlm_Date( void )
 
 vlm_schedule_t *vlm_ScheduleNew( vlm_t *vlm, const char *psz_name )
 {
-    vlm_schedule_t *p_sched = malloc( sizeof( vlm_schedule_t ) );
-
-    if( !p_sched )
-    {
+    if( !psz_name )
         return NULL;
-    }
 
-    if( !psz_name )
-    {
+    vlm_schedule_t *p_sched = malloc( sizeof( vlm_schedule_t ) );
+    if( !p_sched )
         return NULL;
-    }
 
     p_sched->psz_name = strdup( psz_name );
     p_sched->b_enabled = VLC_FALSE;




More information about the vlc-devel mailing list