Detlef Riekenberg : msi/tests: Do not leak a HKEY when RegQueryValueEx failed.
Alexandre Julliard
julliard at winehq.org
Fri Oct 19 08:35:42 CDT 2007
Module: wine
Branch: master
Commit: c54219fb40f1f72775c0135d01a34bbe2f283819
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c54219fb40f1f72775c0135d01a34bbe2f283819
Author: Detlef Riekenberg <wine.dev at web.de>
Date: Thu Oct 18 17:30:06 2007 +0200
msi/tests: Do not leak a HKEY when RegQueryValueEx failed.
---
dlls/msi/tests/install.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index b169886..c00b869 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -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;
More information about the wine-cvs
mailing list