_nt_parse_nk() should not close keys that it does not open.
This commit is contained in:
parent
78767e6dd3
commit
c6161ac66a
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue