Commit 8ebf950b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Avoid accessing an uninitialized variable (valgrind).

parent e21c5282
......@@ -256,18 +256,24 @@ static BOOL get_zone_for_scheme(HKEY key, LPCWSTR schema, DWORD *zone)
/* See if the key contains a value for the scheme first. */
res = RegQueryValueExW(key, schema, NULL, &type, (BYTE*)zone, &size);
if(type != REG_DWORD)
if(res == ERROR_SUCCESS) {
if(type == REG_DWORD)
return TRUE;
WARN("Unexpected value type %d for value %s, expected REG_DWORD\n", type, debugstr_w(schema));
}
/* Try to get the zone for the wildcard scheme. */
size = sizeof(DWORD);
res = RegQueryValueExW(key, wildcardW, NULL, &type, (BYTE*)zone, &size);
if(res != ERROR_SUCCESS)
return FALSE;
if(res != ERROR_SUCCESS || type != REG_DWORD) {
/* Try to get the zone for the wildcard scheme. */
size = sizeof(DWORD);
res = RegQueryValueExW(key, wildcardW, NULL, &type, (BYTE*)zone, &size);
if(type != REG_DWORD)
WARN("Unexpected value type %d for value %s, expected REG_DWORD\n", type, debugstr_w(wildcardW));
if(type != REG_DWORD) {
WARN("Unexpected value type %d for value %s, expected REG_DWORD\n", type, debugstr_w(wildcardW));
return FALSE;
}
return res == ERROR_SUCCESS && type == REG_DWORD;
return TRUE;
}
/********************************************************************
......
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