From 6d3abb68c299c36e760b61effe7e27f2de57b731 Mon Sep 17 00:00:00 2001 From: Thomas Faber Date: Thu, 7 Aug 2014 00:16:21 +0000 Subject: [PATCH] [NTOS:OB] - Use ObpTypeObjectType's lock when modifying object type global properties, not the new object type's - Correctly free string returned by RtlUnicodeStringToAnsiString svn path=/trunk/; revision=63825 --- reactos/ntoskrnl/ob/oblife.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/ntoskrnl/ob/oblife.c b/reactos/ntoskrnl/ob/oblife.c index 0a5324d6d99..15e790d3a9b 100644 --- a/reactos/ntoskrnl/ob/oblife.c +++ b/reactos/ntoskrnl/ob/oblife.c @@ -1145,7 +1145,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName, /* Set the key and free the converted name */ LocalObjectType->Key = *(PULONG)AnsiName.Buffer; - ExFreePool(AnsiName.Buffer); + RtlFreeAnsiString(&AnsiName); } else { @@ -1227,7 +1227,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName, InitializeListHead(&LocalObjectType->TypeList); /* Lock the object type */ - ObpEnterObjectTypeMutex(LocalObjectType); + ObpEnterObjectTypeMutex(ObpTypeObjectType); /* Get creator info and insert it into the type list */ CreatorInfo = OBJECT_HEADER_TO_CREATOR_INFO(Header); @@ -1246,7 +1246,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName, } /* Release the object type */ - ObpLeaveObjectTypeMutex(LocalObjectType); + ObpLeaveObjectTypeMutex(ObpTypeObjectType); /* Check if we're actually creating the directory object itself */ if (!(ObpTypeDirectoryObject) ||