Author: tkreuzer
Date: Tue Jan 7 20:50:34 2014
New Revision: 61569
URL:
http://svn.reactos.org/svn/reactos?rev=61569&view=rev
Log:
[NTOSKRNL]
- Fix return value of ObOpenObjectByName (in success case the return status of
ObpLookupObjectName is returned.
Modified:
trunk/reactos/ntoskrnl/ob/obhandle.c
Modified: trunk/reactos/ntoskrnl/ob/obhandle.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ob/obhandle.c [iso-8859-1] Tue Jan 7 20:50:34 2014
@@ -2431,7 +2431,7 @@
{
PVOID Object = NULL;
UNICODE_STRING ObjectName;
- NTSTATUS Status;
+ NTSTATUS Status, Status2;
POBJECT_HEADER ObjectHeader;
PGENERIC_MAPPING GenericMapping = NULL;
OB_OPEN_REASON OpenReason;
@@ -2557,17 +2557,21 @@
else
{
/* Create the actual handle now */
- Status = ObpCreateHandle(OpenReason,
- Object,
- ObjectType,
- PassedAccessState,
- 0,
- TempBuffer->ObjectCreateInfo.Attributes,
- &TempBuffer->LookupContext,
- AccessMode,
- NULL,
- Handle);
- if (!NT_SUCCESS(Status)) ObDereferenceObject(Object);
+ Status2 = ObpCreateHandle(OpenReason,
+ Object,
+ ObjectType,
+ PassedAccessState,
+ 0,
+ TempBuffer->ObjectCreateInfo.Attributes,
+ &TempBuffer->LookupContext,
+ AccessMode,
+ NULL,
+ Handle);
+ if (!NT_SUCCESS(Status))
+ {
+ ObDereferenceObject(Object);
+ Status = Status2;
+ }
}
Cleanup: