{
ExFreePoolWithTag(*CapturedObjectTypeList, TAG_SEPA);
*CapturedObjectTypeList = NULL;
- return _SEH2_GetExceptionCode();
+ _SEH2_YIELD(return _SEH2_GetExceptionCode());
}
_SEH2_END;
{
Status = _SEH2_GetExceptionCode();
DPRINT1("Exception while probing parameters: 0x%lx\n", Status);
- goto Cleanup;
+ _SEH2_YIELD(goto Cleanup);
}
_SEH2_END;
_SEH2_TRY
{
/* Loop all result entries (only 1 when no list was requested) */
- NT_ASSERT(UseResultList || (ResultListLength == 1));
+ ASSERT(UseResultList || (ResultListLength == 1));
for (i = 0; i < ResultListLength; i++)
{
AccessStatusList[i] = SafeAccessStatusList[i];
if (PrivilegeCount > SEP_PRIVILEGE_SET_MAX_COUNT)
{
Status = STATUS_INVALID_PARAMETER;
- goto Cleanup;
+ _SEH2_YIELD(goto Cleanup);
}
/* Calculate the size of the PrivilegeSet structure */
/* Allocate a temp buffer */
CapturedPrivilegeSet = ExAllocatePoolWithTag(PagedPool,
PrivilegeSetSize,
- 'rPeS');
+ TAG_PRIVILEGE_SET);
if (CapturedPrivilegeSet == NULL)
{
DPRINT1("Failed to allocate %u bytes\n", PrivilegeSetSize);
Status = STATUS_INSUFFICIENT_RESOURCES;
- goto Cleanup;
+ _SEH2_YIELD(goto Cleanup);
}
/* Copy the privileges */
{
Status = _SEH2_GetExceptionCode();
DPRINT1("Exception while probing parameters: 0x%lx\n", Status);
- goto Cleanup;
+ _SEH2_YIELD(goto Cleanup);
}
_SEH2_END;
SeReleaseSecurityDescriptor(CapturedSecurityDescriptor, UserMode, FALSE);
if (CapturedPrivilegeSet != NULL)
- ExFreePoolWithTag(CapturedPrivilegeSet, 'rPeS');
+ ExFreePoolWithTag(CapturedPrivilegeSet, TAG_PRIVILEGE_SET);
/* Release the security subject context */
SeReleaseSubjectContext(&SubjectContext);
if (PrivilegeCount > SEP_PRIVILEGE_SET_MAX_COUNT)
{
Status = STATUS_INVALID_PARAMETER;
- goto Cleanup;
+ _SEH2_YIELD(goto Cleanup);
}
/* Calculate the size of the Privileges structure */
/* Allocate a temp buffer */
CapturedPrivileges = ExAllocatePoolWithTag(PagedPool,
PrivilegesSize,
- 'rPeS');
+ TAG_PRIVILEGE_SET);
if (CapturedPrivileges == NULL)
{
DPRINT1("Failed to allocate %u bytes\n", PrivilegesSize);
Status = STATUS_INSUFFICIENT_RESOURCES;
- goto Cleanup;
+ _SEH2_YIELD(goto Cleanup);
}
/* Copy the privileges */
{
Status = _SEH2_GetExceptionCode();
DPRINT1("Got exception 0x%lx\n", Status);
- goto Cleanup;
+ _SEH2_YIELD(goto Cleanup);
}
_SEH2_END;
ReleaseCapturedUnicodeString(&CapturedServiceName, PreviousMode);
if (CapturedPrivileges != NULL)
- ExFreePoolWithTag(CapturedPrivileges, 'rPeS');
+ ExFreePoolWithTag(CapturedPrivileges, TAG_PRIVILEGE_SET);
/* Release the security subject context */
SeReleaseSubjectContext(&SubjectContext);