]> git.sesse.net Git - vlc/commitdiff
Potential memleak.
authorRémi Duraffort <ivoire@videolan.org>
Thu, 31 Jul 2008 19:55:53 +0000 (21:55 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Thu, 31 Jul 2008 20:10:08 +0000 (22:10 +0200)
modules/codec/fake.c
modules/control/http/http.c
modules/control/lirc.c

index 7696a76f497232d675eb9ceb01ab943cf464ff25..bd4c1cddc8a9575299cd985dd4c3a6ae4dc0d68e 100644 (file)
@@ -154,6 +154,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     if( !psz_file )
     {
         msg_Err( p_dec, "specify a file with --fake-file=..." );
+        free( p_dec->p_sys );
         return VLC_EGENERIC;
     }
     var_AddCallback( p_dec, "fake-file", FakeCallback, p_dec );
@@ -222,6 +223,8 @@ static int OpenDecoder( vlc_object_t *p_this )
     if ( p_image == NULL )
     {
         msg_Err( p_dec, "unable to read image file %s", psz_file );
+        free( psz_file );
+        free( p_dec->p_sys );
         return VLC_EGENERIC;
     }
     msg_Dbg( p_dec, "file %s loaded successfully", psz_file );
index 54cce0bfa75cf51f11920d5c6d144427833f741e..1b1796a1c6b6a1915292e9129bd3a1508df39e9d 100644 (file)
@@ -142,6 +142,7 @@ static int Open( vlc_object_t *p_this )
     p_intf->p_sys = p_sys = malloc( sizeof( intf_sys_t ) );
     if( !p_intf->p_sys )
     {
+        free( psz_address );
         return( VLC_ENOMEM );
     }
 
index 1951c1751a495d5e5dcba6e129621ffd53e65b5b..0ae6fbb1faf8351274d0a73a39aa11e37fac18ed 100644 (file)
@@ -98,6 +98,7 @@ static int Open( vlc_object_t *p_this )
     if( i_fd == -1 )
     {
         msg_Err( p_intf, "lirc initialisation failed" );
+        free( p_intf->p_sys->psz_file );
         free( p_intf->p_sys );
         return 1;
     }
@@ -109,6 +110,7 @@ static int Open( vlc_object_t *p_this )
     {
         msg_Err( p_intf, "failure while reading lirc config" );
         lirc_deinit();
+        free( p_intf->p_sys->psz_file );
         free( p_intf->p_sys );
         return 1;
     }