winhttp: Avoid double free on connection error.
Reported by Stefan Dösinger. Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ca56f99280
commit
96a6053fed
|
@ -234,7 +234,8 @@ netconn_t *netconn_create( hostdata_t *host, const struct sockaddr_storage *sock
|
|||
if (!ret)
|
||||
{
|
||||
WARN("unable to connect to host (%u)\n", get_last_error());
|
||||
netconn_close( conn );
|
||||
closesocket( conn->socket );
|
||||
heap_free( conn );
|
||||
return NULL;
|
||||
}
|
||||
return conn;
|
||||
|
|
Loading…
Reference in New Issue