mirror of
https://github.com/reactos/reactos.git
synced 2025-07-29 09:51:56 +00:00
ObCreateObject should return an existing named object if one already exist.
svn path=/trunk/; revision=14560
This commit is contained in:
parent
366a70a52a
commit
6256db0836
1 changed files with 7 additions and 2 deletions
|
@ -711,10 +711,15 @@ ObCreateObject (IN KPROCESSOR_MODE ObjectAttributesAccessMode OPTIONAL,
|
||||||
}
|
}
|
||||||
if (ParentHeader &&
|
if (ParentHeader &&
|
||||||
RemainingPath.Buffer == NULL)
|
RemainingPath.Buffer == NULL)
|
||||||
|
{
|
||||||
|
if (ParentHeader->ObjectType != Type)
|
||||||
{
|
{
|
||||||
ObDereferenceObject(Parent);
|
ObDereferenceObject(Parent);
|
||||||
return STATUS_OBJECT_NAME_COLLISION;
|
return STATUS_OBJECT_NAME_COLLISION;
|
||||||
}
|
}
|
||||||
|
*Object = Parent;
|
||||||
|
return STATUS_OBJECT_EXISTS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue