_nt_parse_nk() should not close keys that it does not open.

This commit is contained in:
David Elliott 2000-10-31 01:36:50 +00:00 committed by Alexandre Julliard
parent 78767e6dd3
commit c6161ac66a
1 changed files with 4 additions and 1 deletions

View File

@ -746,7 +746,10 @@ static int _nt_parse_nk(HKEY hkey, char * base, nt_nk * nk, int level)
if (!_nt_parse_vk(subkey, base, vk)) goto error1;
}
RegCloseKey(subkey);
/* Don't close the subkey if it is the hkey that was passed
* (i.e. Level was <= 0)
*/
if( subkey!=hkey ) RegCloseKey(subkey);
return TRUE;
error1: RegCloseKey(subkey);