mirror of
https://github.com/reactos/wine.git
synced 2024-11-26 21:20:25 +00:00
msi/tests: Do not leak a HKEY when RegQueryValueEx failed.
This commit is contained in:
parent
44fd06f441
commit
c54219fb40
@ -1006,12 +1006,16 @@ static BOOL get_program_files_dir(LPSTR buf, LPSTR buf2)
|
||||
return FALSE;
|
||||
|
||||
size = MAX_PATH;
|
||||
if (RegQueryValueEx(hkey, "ProgramFilesDir", 0, &type, (LPBYTE)buf, &size))
|
||||
if (RegQueryValueExA(hkey, "ProgramFilesDir", 0, &type, (LPBYTE)buf, &size)) {
|
||||
RegCloseKey(hkey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
size = MAX_PATH;
|
||||
if (RegQueryValueEx(hkey, "CommonFilesDir", 0, &type, (LPBYTE)buf2, &size))
|
||||
if (RegQueryValueExA(hkey, "CommonFilesDir", 0, &type, (LPBYTE)buf2, &size)) {
|
||||
RegCloseKey(hkey);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
RegCloseKey(hkey);
|
||||
return TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user