mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 17:44:45 +00:00
- Reference/dereference the parent key in CmiObjectDelete.
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
This commit is contained in:
parent
5a6cf4163c
commit
335e8718f7
1 changed files with 3 additions and 0 deletions
|
@ -271,6 +271,8 @@ CmiObjectDelete(PVOID DeletedObject)
|
|||
DPRINT("Delete key object (%p)\n", DeletedObject);
|
||||
|
||||
KeyObject = (PKEY_OBJECT) DeletedObject;
|
||||
|
||||
ObReferenceObject(KeyObject->ParentKey);
|
||||
|
||||
if (!NT_SUCCESS(CmiRemoveKeyFromList(KeyObject)))
|
||||
{
|
||||
|
@ -292,6 +294,7 @@ CmiObjectDelete(PVOID DeletedObject)
|
|||
CmiSyncHives();
|
||||
}
|
||||
}
|
||||
ObDereferenceObject(KeyObject->ParentKey);
|
||||
if (KeyObject->NumberOfSubKeys)
|
||||
{
|
||||
KEBUGCHECK(0);
|
||||
|
|
Loading…
Reference in a new issue