Ensure success

svn path=/trunk/; revision=15417
This commit is contained in:
Alex Ionescu 2005-05-20 00:17:35 +00:00
parent 04f9bb0465
commit b1274d7f85

View file

@ -104,17 +104,20 @@ CsrInsertObject(HANDLE ObjectHandle,
&ObjectAttributes,
&Cid);
/* Duplicate the Handle */
Status = ZwDuplicateObject(NtCurrentProcess(),
ObjectHandle,
CsrProcessHandle,
Handle,
DesiredAccess,
TRUE,
0);
if ((NT_SUCCESS(Status)))
{
/* Duplicate the Handle */
Status = ZwDuplicateObject(NtCurrentProcess(),
ObjectHandle,
CsrProcessHandle,
Handle,
DesiredAccess,
TRUE,
0);
/* Close our handle to CSRSS */
NtClose(CsrProcessHandle);
/* Close our handle to CSRSS */
ZwClose(CsrProcessHandle);
}
return Status;
}