[PATCH v2 2/2] winhttp: Avoid double free on connection error.
27 Aug
2018
27 Aug
'18
12:36 p.m.
Reported by Stefan Dösinger. Signed-off-by: Hans Leidekker <hans(a)codeweavers.com> --- dlls/winhttp/net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c index 96624022e2..c141185cf8 100644 --- a/dlls/winhttp/net.c +++ b/dlls/winhttp/net.c @@ -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; -- 2.11.0
2669
Age (days ago)
2669
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hans Leidekker