[vlc-devel] commit: access_out_shoutcast: fix memleak. ( Rémi Duraffort )
git version control
git at videolan.org
Thu Oct 15 15:44:35 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Oct 15 15:39:28 2009 +0200| [73b7ed7fa3276a07d9312f833508bb5965afe12d] | committer: Rémi Duraffort
access_out_shoutcast: fix memleak.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=73b7ed7fa3276a07d9312f833508bb5965afe12d
---
modules/access_output/shout.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/access_output/shout.c b/modules/access_output/shout.c
index 1a8bad8..8bf0ada 100644
--- a/modules/access_output/shout.c
+++ b/modules/access_output/shout.c
@@ -275,10 +275,10 @@ static int Open( vlc_object_t *p_this )
if( psz_val )
{
i_ret = shout_set_audio_info( p_shout, SHOUT_AI_BITRATE, psz_val );
+ free( psz_val );
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the information about the bitrate" );
- free( psz_val );
free( p_access->p_sys );
free( psz_accessname );
return VLC_EGENERIC;
@@ -300,10 +300,10 @@ static int Open( vlc_object_t *p_this )
if( psz_val )
{
i_ret = shout_set_audio_info( p_shout, SHOUT_AI_SAMPLERATE, psz_val );
+ free( psz_val );
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the information about the samplerate" );
- free( psz_val );
free( p_access->p_sys );
free( psz_accessname );
return VLC_EGENERIC;
@@ -314,10 +314,10 @@ static int Open( vlc_object_t *p_this )
if( psz_val )
{
i_ret = shout_set_audio_info( p_shout, SHOUT_AI_CHANNELS, psz_val );
+ free( psz_val );
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the information about the number of channels" );
- free( psz_val );
free( p_access->p_sys );
free( psz_accessname );
return VLC_EGENERIC;
@@ -328,10 +328,10 @@ static int Open( vlc_object_t *p_this )
if( psz_val )
{
i_ret = shout_set_audio_info( p_shout, SHOUT_AI_QUALITY, psz_val );
+ free( psz_val );
if( i_ret != SHOUTERR_SUCCESS )
{
msg_Err( p_access, "failed to set the information about Ogg Vorbis quality" );
- free( psz_val );
free( p_access->p_sys );
free( psz_accessname );
return VLC_EGENERIC;
More information about the vlc-devel
mailing list