Module: wine Branch: master Commit: 9a85a84765584a075c41684262b9bcfa3682a4fa URL: http://source.winehq.org/git/wine.git/?a=commit;h=9a85a84765584a075c41684262...
Author: Jacek Caban jacek@codeweavers.com Date: Sun May 29 19:19:34 2016 +0200
wininet: Fixed leak in HTTP_DealWithProxy (coverity).
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/wininet/http.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index dfe8a39..ed5105d 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -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);