Commit faa68dab authored by Alex Henrie's avatar Alex Henrie Committed by Alexandre Julliard

wininet: Fix memory leaks on error paths in INTERNET_LoadProxySettings (scan-build).

parent 100131fa
......@@ -637,6 +637,7 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi )
if (!(szProxy = malloc( len )))
{
RegCloseKey( key );
FreeProxyInfo( lpwpi );
return ERROR_OUTOFMEMORY;
}
RegQueryValueExW( key, L"ProxyOverride", NULL, &type, (BYTE*)szProxy, &len );
......@@ -661,6 +662,7 @@ static LONG INTERNET_LoadProxySettings( proxyinfo_t *lpwpi )
if (!(envproxyW = malloc( wcslen(envproxy) * sizeof(WCHAR) )))
{
RegCloseKey( key );
FreeProxyInfo( lpwpi );
return ERROR_OUTOFMEMORY;
}
lstrcpyW( envproxyW, envproxy );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment