[vlc-commits] commit: Fixed double frees in libvlc_audio_output_device_longname/id. ( Laurent Aimar )
git at videolan.org
git at videolan.org
Tue Nov 2 09:06:37 CET 2010
vlc/vlc-1.1 | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Oct 31 12:34:45 2010 +0100| [92c977e2e03fcbb1d753c0bb940c61f5fc16911c] | committer: Rémi Duraffort
Fixed double frees in libvlc_audio_output_device_longname/id.
(cherry picked from commit f103a7c2dae0020a4772b3a2f8c74997accc5111)
Signed-off-by: Rémi Duraffort <ivoire at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=92c977e2e03fcbb1d753c0bb940c61f5fc16911c
---
src/control/audio.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/control/audio.c b/src/control/audio.c
index b7ebf34..6a25022 100644
--- a/src/control/audio.c
+++ b/src/control/audio.c
@@ -198,10 +198,11 @@ char * libvlc_audio_output_device_longname( libvlc_instance_t *p_instance,
VLC_OBJECT( p_instance->p_libvlc_int ), psz_config_name, val, val, NULL );
free( val.psz_string );
}
- free( psz_config_name );
if( i_device >= 0 && i_device < p_module_config->i_list )
{
+ free( psz_config_name );
+
if( p_module_config->ppsz_list_text[i_device] )
return strdup( p_module_config->ppsz_list_text[i_device] );
else
@@ -241,11 +242,12 @@ char * libvlc_audio_output_device_id( libvlc_instance_t *p_instance,
VLC_OBJECT( p_instance->p_libvlc_int ), psz_config_name, val, val, NULL );
free( val.psz_string );
}
- free( psz_config_name );
if( i_device >= 0 && i_device < p_module_config->i_list )
+ {
+ free( psz_config_name );
return strdup( p_module_config->ppsz_list[i_device] );
-
+ }
}
free( psz_config_name );
More information about the vlc-commits
mailing list