Commit f320acd6 authored by Rémi Duraffort's avatar Rémi Duraffort

audioscrobbler: fix memleak.

parent 30868d32
...@@ -792,16 +792,21 @@ static int Handshake( intf_thread_t *p_this ) ...@@ -792,16 +792,21 @@ static int Handshake( intf_thread_t *p_this )
psz_scrobbler_url = strdup( "post.audioscrobbler.com" ); psz_scrobbler_url = strdup( "post.audioscrobbler.com" );
#endif #endif
if( !psz_scrobbler_url ) if( !psz_scrobbler_url )
{
free( psz_username );
return VLC_ENOMEM; return VLC_ENOMEM;
}
if( !asprintf( &psz_handshake_url, 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, "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, CLIENT_NAME, CLIENT_VERSION, psz_username, psz_timestamp,
p_sys->psz_auth_token ) ) p_sys->psz_auth_token ) )
{ {
free( psz_scrobbler_url );
free( psz_username ); free( psz_username );
return VLC_ENOMEM; return VLC_ENOMEM;
} }
free( psz_scrobbler_url );
free( psz_username ); free( psz_username );
/* send the http handshake request */ /* send the http handshake request */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment