Don't dereference the object unless we actually referenced it. Cygwin apps

no longer bugcheck reactos when abnormally terminating.

svn path=/trunk/; revision=28971
This commit is contained in:
Art Yerkes 2007-09-09 11:09:56 +00:00
parent b4bf4d4ce9
commit 10b515935a

View file

@ -774,10 +774,11 @@ NtSetSecurityObject(IN HANDLE Handle,
SeReleaseSecurityDescriptor((PSECURITY_DESCRIPTOR)CapturedDescriptor,
PreviousMode,
TRUE);
/* Now we can dereference the object */
ObDereferenceObject(Object);
}
/* Now we can dereference the object */
ObDereferenceObject(Object);
return Status;
}