[PATCH] winhttp: Avoid returning while holding a lock (Coverity)
Nikolay Sivov
nsivov at codeweavers.com
Mon Jul 24 07:41:01 CDT 2017
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/winhttp/request.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index f71b17e938..b72d2c1800 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -1121,19 +1121,21 @@ static BOOL open_connection( request_t *request )
if (!host)
{
- if (!(host = heap_alloc( sizeof(*host) ))) return FALSE;
- host->ref = 1;
- host->secure = is_secure;
- host->port = port;
- list_init( &host->connections );
- if ((host->hostname = strdupW( connect->servername )))
+ if ((host = heap_alloc( sizeof(*host) )))
{
- list_add_head( &connection_pool, &host->entry );
- }
- else
- {
- heap_free( host );
- host = NULL;
+ host->ref = 1;
+ host->secure = is_secure;
+ host->port = port;
+ list_init( &host->connections );
+ if ((host->hostname = strdupW( connect->servername )))
+ {
+ list_add_head( &connection_pool, &host->entry );
+ }
+ else
+ {
+ heap_free( host );
+ host = NULL;
+ }
}
}
--
2.13.2
More information about the wine-patches
mailing list