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:
parent
0bf6df6866
commit
9a85a84765
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue