summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/win/src/broker_services.cc6
-rw-r--r--sandbox/win/src/sandbox_types.h2
2 files changed, 6 insertions, 2 deletions
diff --git a/sandbox/win/src/broker_services.cc b/sandbox/win/src/broker_services.cc
index d88e5eb..f23d431 100644
--- a/sandbox/win/src/broker_services.cc
+++ b/sandbox/win/src/broker_services.cc
@@ -487,8 +487,10 @@ ResultCode BrokerServicesBase::SpawnTarget(const wchar_t* exe_path,
DWORD win_result = target->Create(exe_path, command_line, inherit_handles,
policy_base->GetLowBoxSid() ? true : false,
startup_info, &process_info);
- if (ERROR_SUCCESS != win_result)
- return SpawnCleanup(target, win_result);
+ if (ERROR_SUCCESS != win_result) {
+ SpawnCleanup(target, win_result);
+ return SBOX_ERROR_CREATE_PROCESS;
+ }
// Now the policy is the owner of the target.
if (!policy_base->AddTarget(target)) {
diff --git a/sandbox/win/src/sandbox_types.h b/sandbox/win/src/sandbox_types.h
index 22840ce..3e531be 100644
--- a/sandbox/win/src/sandbox_types.h
+++ b/sandbox/win/src/sandbox_types.h
@@ -45,6 +45,8 @@ enum ResultCode {
SBOX_ERROR_CANNOT_INIT_APPCONTAINER = 16,
// Initializing or updating ProcThreadAttributes failed.
SBOX_ERROR_PROC_THREAD_ATTRIBUTES = 17,
+ // Error in creating process.
+ SBOX_ERROR_CREATE_PROCESS = 18,
// Placeholder for last item of the enum.
SBOX_ERROR_LAST
};