mirror of
https://github.com/reactos/reactos.git
synced 2025-06-05 17:30:32 +00:00
[NTOSKRNL]
- Fix return value of ObOpenObjectByName (in success case the return status of ObpLookupObjectName is returned. svn path=/trunk/; revision=61569
This commit is contained in:
parent
0a7344aca7
commit
f6c5b356aa
1 changed files with 16 additions and 12 deletions
|
@ -2431,7 +2431,7 @@ ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||||
{
|
{
|
||||||
PVOID Object = NULL;
|
PVOID Object = NULL;
|
||||||
UNICODE_STRING ObjectName;
|
UNICODE_STRING ObjectName;
|
||||||
NTSTATUS Status;
|
NTSTATUS Status, Status2;
|
||||||
POBJECT_HEADER ObjectHeader;
|
POBJECT_HEADER ObjectHeader;
|
||||||
PGENERIC_MAPPING GenericMapping = NULL;
|
PGENERIC_MAPPING GenericMapping = NULL;
|
||||||
OB_OPEN_REASON OpenReason;
|
OB_OPEN_REASON OpenReason;
|
||||||
|
@ -2557,17 +2557,21 @@ ObOpenObjectByName(IN POBJECT_ATTRIBUTES ObjectAttributes,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Create the actual handle now */
|
/* Create the actual handle now */
|
||||||
Status = ObpCreateHandle(OpenReason,
|
Status2 = ObpCreateHandle(OpenReason,
|
||||||
Object,
|
Object,
|
||||||
ObjectType,
|
ObjectType,
|
||||||
PassedAccessState,
|
PassedAccessState,
|
||||||
0,
|
0,
|
||||||
TempBuffer->ObjectCreateInfo.Attributes,
|
TempBuffer->ObjectCreateInfo.Attributes,
|
||||||
&TempBuffer->LookupContext,
|
&TempBuffer->LookupContext,
|
||||||
AccessMode,
|
AccessMode,
|
||||||
NULL,
|
NULL,
|
||||||
Handle);
|
Handle);
|
||||||
if (!NT_SUCCESS(Status)) ObDereferenceObject(Object);
|
if (!NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
ObDereferenceObject(Object);
|
||||||
|
Status = Status2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Cleanup:
|
Cleanup:
|
||||||
|
|
Loading…
Reference in a new issue