mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-02 04:13:34 +00:00
Do not dereference key objects if they are used to link hives.
svn path=/trunk/; revision=7526
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* $Id: registry.c,v 1.117 2004/01/08 15:02:45 ekohl Exp $
|
||||
/* $Id: registry.c,v 1.118 2004/01/09 19:42:40 ekohl Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
@@ -622,7 +622,7 @@ CmiConnectHive(IN POBJECT_ATTRIBUTES KeyObjectAttributes,
|
||||
|
||||
VERIFY_KEY_OBJECT(NewKey);
|
||||
|
||||
ObDereferenceObject (NewKey);
|
||||
/* Note: Do not dereference NewKey here! */
|
||||
ObDereferenceObject (ParentKey);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
@@ -725,6 +725,8 @@ CmiDisconnectHive (IN POBJECT_ATTRIBUTES KeyObjectAttributes,
|
||||
Entry = Entry->Flink;
|
||||
}
|
||||
|
||||
/* Note: Dereference the key object twice in order to delete it */
|
||||
ObDereferenceObject (KeyObject);
|
||||
ObDereferenceObject (KeyObject);
|
||||
|
||||
*RegistryHive = Hive;
|
||||
|
||||
Reference in New Issue
Block a user