Hans Leidekker : winhttp: Avoid double free on connection error.
Alexandre Julliard
julliard at winehq.org
Mon Aug 27 16:18:16 CDT 2018
Module: wine
Branch: master
Commit: 96a6053feda4e16480c21d01b3688a8d38e5ad6d
URL: https://source.winehq.org/git/wine.git/?a=commit;h=96a6053feda4e16480c21d01b3688a8d38e5ad6d
Author: Hans Leidekker <hans at codeweavers.com>
Date: Mon Aug 27 14:36:39 2018 +0200
winhttp: Avoid double free on connection error.
Reported by Stefan Dösinger.
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 9662402..c141185 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;
More information about the wine-cvs
mailing list