Skip to content
Snippets Groups Projects
Commit a16b9ff5 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard
Browse files

comdlg32: Improve error handling in get_config_key_string.

parent 0239026b
Branches
Tags
No related merge requests found
......@@ -250,11 +250,10 @@ static BOOL get_config_key_string(HKEY hkey, const WCHAR *name, WCHAR **value)
DWORD type, size;
WCHAR *str;
if (hkey && !RegQueryValueExW(hkey, name, 0, &type, NULL, &size))
{
if (type != REG_SZ && type != REG_EXPAND_SZ)
return FALSE;
}
if (RegQueryValueExW(hkey, name, 0, &type, NULL, &size))
return FALSE;
if (type != REG_SZ && type != REG_EXPAND_SZ)
return FALSE;
str = heap_alloc(size);
if (RegQueryValueExW(hkey, name, 0, &type, (BYTE *)str, &size))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment