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

git version control git at videolan.org
Fri Aug 1 17:22:29 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Aug  1 17:18:23 2008 +0200| [19933fe7a674ee6d1253821a656507a6a712f8d0] | committer: Rémi Duraffort 

Fix potential memleak.

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

 modules/audio_output/oss.c                     |    1 +
 modules/gui/qt4/components/extended_panels.cpp |    3 +++
 2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c
index 27359c7..929aeac 100644
--- a/modules/audio_output/oss.c
+++ b/modules/audio_output/oss.c
@@ -299,6 +299,7 @@ static int Open( vlc_object_t *p_this )
     if( p_sys->i_fd < 0 )
     {
         msg_Err( p_aout, "cannot open audio device (%s)", psz_device );
+        free( psz_device );
         free( p_sys );
         return VLC_EGENERIC;
     }
diff --git a/modules/gui/qt4/components/extended_panels.cpp b/modules/gui/qt4/components/extended_panels.cpp
index 9e1d30e..018a697 100644
--- a/modules/gui/qt4/components/extended_panels.cpp
+++ b/modules/gui/qt4/components/extended_panels.cpp
@@ -279,7 +279,10 @@ void ExtVideo::ChangeVFiltersString( char *psz_name, bool b_add )
             psz_parser = psz_string;
             if( asprintf( &psz_string, ( *psz_string ) ? "%s:%s" : "%s%s",
                             psz_string, psz_name ) == -1 )
+            {
+                free( psz_parser );
                 return;
+            }
             free( psz_parser );
         }
         else




More information about the vlc-devel mailing list