summaryrefslogtreecommitdiffstats
path: root/sandbox/win/src/target_process.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sandbox/win/src/target_process.cc')
-rw-r--r--sandbox/win/src/target_process.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sandbox/win/src/target_process.cc b/sandbox/win/src/target_process.cc
index 9300cce..a2d630c 100644
--- a/sandbox/win/src/target_process.cc
+++ b/sandbox/win/src/target_process.cc
@@ -131,8 +131,7 @@ DWORD TargetProcess::Create(const wchar_t* exe_path,
flags |= CREATE_BREAKAWAY_FROM_JOB;
}
- base::win::ScopedProcessInformation process_info;
-
+ PROCESS_INFORMATION temp_process_info = {};
if (!::CreateProcessAsUserW(lockdown_token_,
exe_path,
cmd_line.get(),
@@ -143,9 +142,10 @@ DWORD TargetProcess::Create(const wchar_t* exe_path,
NULL, // Use the environment of the caller.
NULL, // Use current directory of the caller.
startup_info.startup_info(),
- process_info.Receive())) {
+ &temp_process_info)) {
return ::GetLastError();
}
+ base::win::ScopedProcessInformation process_info(temp_process_info);
lockdown_token_.Close();
DWORD win_result = ERROR_SUCCESS;