RegCloseKey when we are done with RegOpenKeyEx.

git-svn-id: https://svn.eduke32.com/eduke32@4127 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2013-11-03 04:02:01 +00:00
parent 975a329fcf
commit 837c5c6b84

View file

@ -284,6 +284,7 @@ const char * G_GetInstallPath(int32_t insttype)
// KEY_WOW64_32KEY gets us around Wow6432Node on 64-bit builds // KEY_WOW64_32KEY gets us around Wow6432Node on 64-bit builds
if (keygood == ERROR_SUCCESS) if (keygood == ERROR_SUCCESS)
{
switch (insttype) switch (insttype)
{ {
case INSTPATH_STEAM: case INSTPATH_STEAM:
@ -293,6 +294,9 @@ const char * G_GetInstallPath(int32_t insttype)
success[insttype] = SHGetValueA(HKLM32, "SOFTWARE\\GOG.com\\GOGDUKE3D", "PATH", NULL, spath[insttype], (LPDWORD)&siz); success[insttype] = SHGetValueA(HKLM32, "SOFTWARE\\GOG.com\\GOGDUKE3D", "PATH", NULL, spath[insttype], (LPDWORD)&siz);
break; break;
} }
RegCloseKey(HKLM32);
}
} }
if (success[insttype] == ERROR_SUCCESS) if (success[insttype] == ERROR_SUCCESS)