[vlc-devel] commit: audioscrobbler: fix memleak. ( Rémi Duraffort )
git version control
git at videolan.org
Sun May 3 10:34:35 CEST 2009
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun May 3 10:34:19 2009 +0200| [f320acd633583cd6327ab0ec3f30548665593363] | committer: Rémi Duraffort
audioscrobbler: fix memleak.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f320acd633583cd6327ab0ec3f30548665593363
---
modules/misc/audioscrobbler.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules/misc/audioscrobbler.c b/modules/misc/audioscrobbler.c
index a7b74ad..7dd9401 100644
--- a/modules/misc/audioscrobbler.c
+++ b/modules/misc/audioscrobbler.c
@@ -792,16 +792,21 @@ static int Handshake( intf_thread_t *p_this )
psz_scrobbler_url = strdup( "post.audioscrobbler.com" );
#endif
if( !psz_scrobbler_url )
+ {
+ free( psz_username );
return VLC_ENOMEM;
+ }
if( !asprintf( &psz_handshake_url,
"http://%s/?hs=true&p=1.2&c=%s&v=%s&u=%s&t=%s&a=%s", psz_scrobbler_url,
CLIENT_NAME, CLIENT_VERSION, psz_username, psz_timestamp,
p_sys->psz_auth_token ) )
{
+ free( psz_scrobbler_url );
free( psz_username );
return VLC_ENOMEM;
}
+ free( psz_scrobbler_url );
free( psz_username );
/* send the http handshake request */
More information about the vlc-devel
mailing list