Index: remoting/host/win/wts_session_process_delegate.cc |
=================================================================== |
--- remoting/host/win/wts_session_process_delegate.cc (revision 237598) |
+++ remoting/host/win/wts_session_process_delegate.cc (working copy) |
@@ -513,11 +513,11 @@ |
// query information about the process and duplicate handles. |
DWORD desired_access = |
SYNCHRONIZE | PROCESS_DUP_HANDLE | PROCESS_QUERY_INFORMATION; |
- HANDLE temp_handle; |
+ ScopedHandle limited_handle; |
if (!DuplicateHandle(GetCurrentProcess(), |
worker_process_, |
GetCurrentProcess(), |
- &temp_handle, |
+ limited_handle.Receive(), |
desired_access, |
FALSE, |
0)) { |
@@ -525,7 +525,6 @@ |
ReportFatalError(); |
return; |
} |
- ScopedHandle limited_handle(temp_handle); |
event_handler_->OnProcessLaunched(limited_handle.Pass()); |
} |