HBelusca
committed
on 16 Jun
[NTOS]: Fix a bit the CmUnloadKey() function:
- When a hive is unloaded, we *must* set the HIVE_IS_UNLOADING flag before doing anything else… Show more
[NTOS]: Fix a bit the CmUnloadKey() function:

- When a hive is unloaded, we *must* set the HIVE_IS_UNLOADING flag before doing anything else (as other code in Cm depends on this);

- If we don't force a hive unload, we *must* check whether there are other opened handles to keys inside this hive, and if so, we must fail.

 If this is a force-unload however, we *must* invalidate/close all the opened handles to keys inside this hive, BUT this is left UNIMPLEMENTED at the moment (and therefore expect the already existing problems linked to this to still happen).

- Move the HvFree(Hive); call at the very end, just before deleting the Cm hive, and as is done in CmpDestroyHive(). Show less