mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 04:14:53 +00:00
[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
This commit is contained in:
parent
1f60ce121c
commit
6d3abb68c2
1 changed files with 3 additions and 3 deletions
|
@ -1145,7 +1145,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
|
||||||
|
|
||||||
/* Set the key and free the converted name */
|
/* Set the key and free the converted name */
|
||||||
LocalObjectType->Key = *(PULONG)AnsiName.Buffer;
|
LocalObjectType->Key = *(PULONG)AnsiName.Buffer;
|
||||||
ExFreePool(AnsiName.Buffer);
|
RtlFreeAnsiString(&AnsiName);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1227,7 +1227,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
|
||||||
InitializeListHead(&LocalObjectType->TypeList);
|
InitializeListHead(&LocalObjectType->TypeList);
|
||||||
|
|
||||||
/* Lock the object type */
|
/* Lock the object type */
|
||||||
ObpEnterObjectTypeMutex(LocalObjectType);
|
ObpEnterObjectTypeMutex(ObpTypeObjectType);
|
||||||
|
|
||||||
/* Get creator info and insert it into the type list */
|
/* Get creator info and insert it into the type list */
|
||||||
CreatorInfo = OBJECT_HEADER_TO_CREATOR_INFO(Header);
|
CreatorInfo = OBJECT_HEADER_TO_CREATOR_INFO(Header);
|
||||||
|
@ -1246,7 +1246,7 @@ ObCreateObjectType(IN PUNICODE_STRING TypeName,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Release the object type */
|
/* Release the object type */
|
||||||
ObpLeaveObjectTypeMutex(LocalObjectType);
|
ObpLeaveObjectTypeMutex(ObpTypeObjectType);
|
||||||
|
|
||||||
/* Check if we're actually creating the directory object itself */
|
/* Check if we're actually creating the directory object itself */
|
||||||
if (!(ObpTypeDirectoryObject) ||
|
if (!(ObpTypeDirectoryObject) ||
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue