if (!SandboxFactory::GetTargetServices()->GetState()->InitCalled())
return status;
+ wchar_t* name = NULL;
do {
if (!ValidParameter(file, sizeof(HANDLE), WRITE))
break;
if (NULL == memory)
break;
- wchar_t* name;
uint32 attributes = 0;
NTSTATUS ret = AllocAndCopyName(object_attributes, &name, &attributes,
NULL);
ResultCode code = CrossCall(ipc, IPC_NTCREATEFILE_TAG, name, attributes,
desired_access, file_attributes, sharing,
disposition, options, &answer);
-
- operator delete(name, NT_ALLOC);
-
if (SBOX_ALL_OK != code)
break;
}
} while (false);
+ if (name)
+ operator delete(name, NT_ALLOC);
+
return status;
}
if (!SandboxFactory::GetTargetServices()->GetState()->InitCalled())
return status;
+ wchar_t* name = NULL;
do {
if (!ValidParameter(file, sizeof(HANDLE), WRITE))
break;
if (NULL == memory)
break;
- wchar_t* name;
uint32 attributes;
NTSTATUS ret = AllocAndCopyName(object_attributes, &name, &attributes,
NULL);
CrossCallReturn answer = {0};
ResultCode code = CrossCall(ipc, IPC_NTOPENFILE_TAG, name, attributes,
desired_access, sharing, options, &answer);
-
- operator delete(name, NT_ALLOC);
-
if (SBOX_ALL_OK != code)
break;
}
} while (false);
+ if (name)
+ operator delete(name, NT_ALLOC);
+
return status;
}
if (!SandboxFactory::GetTargetServices()->GetState()->InitCalled())
return status;
+ wchar_t* name = NULL;
do {
if (!ValidParameter(file_attributes, sizeof(FILE_BASIC_INFORMATION), WRITE))
break;
if (NULL == memory)
break;
- wchar_t* name = NULL;
uint32 attributes = 0;
NTSTATUS ret = AllocAndCopyName(object_attributes, &name, &attributes,
NULL);
} while (false);
+ if (name)
+ operator delete(name, NT_ALLOC);
+
return status;
}
if (!SandboxFactory::GetTargetServices()->GetState()->InitCalled())
return status;
+ wchar_t* name = NULL;
do {
if (!ValidParameter(file_attributes, sizeof(FILE_NETWORK_OPEN_INFORMATION),
WRITE))
if (NULL == memory)
break;
- wchar_t* name = NULL;
uint32 attributes = 0;
NTSTATUS ret = AllocAndCopyName(object_attributes, &name, &attributes,
NULL);
return answer.nt_status;
} while (false);
+ if (name)
+ operator delete(name, NT_ALLOC);
+
return status;
}
if (!SandboxFactory::GetTargetServices()->GetState()->InitCalled())
return status;
+ wchar_t* name = NULL;
do {
void* memory = GetGlobalIPCMemory();
if (NULL == memory)
break;
}
- wchar_t* name;
NTSTATUS ret = AllocAndCopyName(&object_attributes, &name, NULL, NULL);
if (!NT_SUCCESS(ret) || !name)
break;
status = answer.nt_status;
} while (false);
+ if (name)
+ operator delete(name, NT_ALLOC);
+
return status;
}