Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Unified Diff: sandbox/win/src/broker_services.cc

Issue 10821018: Remove use-after-free bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/broker_services.cc
diff --git a/sandbox/win/src/broker_services.cc b/sandbox/win/src/broker_services.cc
index 80837b3b491e7eddea4b6b91e1c92161d26fca9c..6aca8e52aecc1accc4f2f31b170eeee11fd08685 100644
--- a/sandbox/win/src/broker_services.cc
+++ b/sandbox/win/src/broker_services.cc
@@ -297,12 +297,12 @@ ResultCode BrokerServicesBase::SpawnTarget(const wchar_t* exe_path,
HANDLE lockdown_token_temp;
DWORD win_result = policy_base->MakeTokens(&initial_token_temp,
&lockdown_token_temp);
- base::win::ScopedHandle initial_token(initial_token_temp);
- base::win::ScopedHandle lockdown_token(lockdown_token_temp);
-
if (ERROR_SUCCESS != win_result)
return SBOX_ERROR_GENERIC;
+ base::win::ScopedHandle initial_token(initial_token_temp);
+ base::win::ScopedHandle lockdown_token(lockdown_token_temp);
+
HANDLE job_temp;
win_result = policy_base->MakeJobObject(&job_temp);
base::win::ScopedHandle job(job_temp);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698