From 19933fe7a674ee6d1253821a656507a6a712f8d0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Fri, 1 Aug 2008 17:18:23 +0200 Subject: [PATCH] Fix potential memleak. --- modules/audio_output/oss.c | 1 + modules/gui/qt4/components/extended_panels.cpp | 3 +++ 2 files changed, 4 insertions(+) diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c index 27359c7452..929aeacb7e 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 9e1d30e394..018a697f0b 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 -- 2.39.2