[vlc-commits] commit: Fixed double frees in libvlc_audio_output_device_longname/id. ( Laurent Aimar )
git at videolan.org
git at videolan.org
Sun Oct 31 13:05:28 CET 2010
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Sun Oct 31 12:34:45 2010 +0100| [f103a7c2dae0020a4772b3a2f8c74997accc5111] | committer: Laurent Aimar
Fixed double frees in libvlc_audio_output_device_longname/id.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f103a7c2dae0020a4772b3a2f8c74997accc5111
---
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 6088750..a6e7888 100644
--- a/src/control/audio.c
+++ b/src/control/audio.c
@@ -199,10 +199,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
@@ -242,11 +243,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