mshtml: Fix BSTR leak in SetReferrerWithPolicy() (Valgrind).

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Jacek Caban<jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-11-10 00:21:56 +03:00 committed by Alexandre Julliard
parent e574350b62
commit 15a07c0725
1 changed files with 3 additions and 1 deletions

View File

@ -1343,8 +1343,10 @@ static nsresult NSAPI nsChannel_SetReferrerWithPolicy(nsIHttpChannel *iface, nsI
}
hres = IUri_GetDisplayUri(referrer->uri, &referrer_uri);
if(SUCCEEDED(hres) )
if(SUCCEEDED(hres)) {
set_http_header(&This->request_headers, refererW, sizeof(refererW)/sizeof(WCHAR), referrer_uri, SysStringLen(referrer_uri));
SysFreeString(referrer_uri);
}
This->referrer = (nsIURI*)&referrer->nsIFileURL_iface;
return NS_OK;