wininet: Fixed leak in HTTP_DealWithProxy (coverity).

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Jacek Caban 2016-05-29 19:19:34 +02:00 committed by Alexandre Julliard
parent 0bf6df6866
commit 9a85a84765
1 changed files with 3 additions and 1 deletions

View File

@ -1798,8 +1798,10 @@ static BOOL HTTP_DealWithProxy(appinfo_t *hIC, http_session_t *session, http_req
if(CSTR_EQUAL != CompareStringW(LOCALE_SYSTEM_DEFAULT, NORM_IGNORECASE,
proxy, strlenW(szHttp), szHttp, strlenW(szHttp))) {
WCHAR *proxy_url = heap_alloc(strlenW(proxy)*sizeof(WCHAR) + sizeof(szHttp));
if(!proxy_url)
if(!proxy_url) {
heap_free(proxy);
return FALSE;
}
strcpyW(proxy_url, szHttp);
strcatW(proxy_url, proxy);
heap_free(proxy);