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

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

Issue 1337223002: Fixes to possible GetLastError bugs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed some sandbox changes Created 5 years, 3 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 | « sandbox/win/src/process_thread_interception.cc ('k') | sandbox/win/src/restricted_token_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/restricted_token.cc
diff --git a/sandbox/win/src/restricted_token.cc b/sandbox/win/src/restricted_token.cc
index df5a87ccf0c0e60c0c4dcd6f9bfffb03705e271b..f0fc4cbc37df144fc2f1899181f309ecdf3f91bf 100644
--- a/sandbox/win/src/restricted_token.cc
+++ b/sandbox/win/src/restricted_token.cc
@@ -140,6 +140,7 @@ DWORD RestrictedToken::GetRestrictedToken(
SecurityIdentification, TokenPrimary,
&new_token_handle);
}
+ auto last_error = ::GetLastError();
if (deny_only_array)
delete[] deny_only_array;
@@ -151,7 +152,7 @@ DWORD RestrictedToken::GetRestrictedToken(
delete[] privileges_to_disable_array;
if (!result)
- return ::GetLastError();
+ return last_error;
base::win::ScopedHandle new_token(new_token_handle);
« no previous file with comments | « sandbox/win/src/process_thread_interception.cc ('k') | sandbox/win/src/restricted_token_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698