winhttp: Fix a couple of memory leaks (valgrind).
Hans Leidekker
hans at codeweavers.com
Tue May 13 06:43:11 CDT 2014
---
dlls/winhttp/net.c | 1 +
dlls/winhttp/request.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c
index 7466d36..b751bf0 100644
--- a/dlls/winhttp/net.c
+++ b/dlls/winhttp/net.c
@@ -488,6 +488,7 @@ BOOL netconn_secure_connect( netconn_t *conn, WCHAR *hostname )
}
}
+ heap_free(read_buf);
if(status != SEC_E_OK || res != ERROR_SUCCESS) {
WARN("Failed to initialize security context failed: %08x\n", status);
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index 374051a..54aa616 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -2250,6 +2250,8 @@ static BOOL handle_redirect( request_t *request, DWORD status )
request->read_chunked = FALSE;
request->read_chunked_eof = FALSE;
}
+ else heap_free( hostname );
+
if (!(ret = add_host_header( request, WINHTTP_ADDREQ_FLAG_REPLACE ))) goto end;
if (!(ret = open_connection( request ))) goto end;
@@ -2278,7 +2280,6 @@ static BOOL handle_redirect( request_t *request, DWORD status )
ret = TRUE;
end:
- if (!ret) heap_free( hostname );
heap_free( location );
return ret;
}
--
2.0.0.rc2
More information about the wine-patches
mailing list