The call to CmiRemoveKeyFromList does dereference the parent and
it is possible that the parent key is deleted before the
subkey delete process is complete.
svn path=/trunk/; revision=5938
DPRINT("Delete key object (%p)\n", DeletedObject);
KeyObject = (PKEY_OBJECT) DeletedObject;
+
+ ObReferenceObject(KeyObject->ParentKey);
if (!NT_SUCCESS(CmiRemoveKeyFromList(KeyObject)))
{
CmiSyncHives();
}
}
+ ObDereferenceObject(KeyObject->ParentKey);
if (KeyObject->NumberOfSubKeys)
{
KEBUGCHECK(0);