comdlg32: Improve error handling in get_config_key_string.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0239026bf3
commit
a16b9ff583
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue