diff --git a/cheevos.c b/cheevos.c index a5121427b0..7bf01d642f 100644 --- a/cheevos.c +++ b/cheevos.c @@ -1057,11 +1057,7 @@ static const char* cheevos_http_get( const char* url, size_t* size ) while ( !net_http_connection_iterate( conn ) ) { } if ( !net_http_connection_done( conn ) ) - { -error1: - net_http_connection_free( conn ); - return NULL; - } + goto error; http = net_http_new( conn ); @@ -1090,6 +1086,10 @@ error1: return (char*)result; +error1: + net_http_connection_free( conn ); + return NULL; + #else /* HAVE_NETWORKING */ RARCH_LOG( "CHEEVOS http get %s\n", url );