Index: remoting/host/desktop_session_proxy.cc |
diff --git a/remoting/host/desktop_session_proxy.cc b/remoting/host/desktop_session_proxy.cc |
index 058a2f46a6be24cc6757f0ef96ae721105fd1bc7..9e52f8d6dbcf35299b2ded382a83c176bb100462 100644 |
--- a/remoting/host/desktop_session_proxy.cc |
+++ b/remoting/host/desktop_session_proxy.cc |
@@ -230,9 +230,9 @@ |
#if defined(OS_WIN) |
// On Windows: |desktop_process| is a valid handle, but |desktop_pipe| needs |
// to be duplicated from the desktop process. |
- HANDLE temp_handle; |
+ base::win::ScopedHandle pipe; |
if (!DuplicateHandle(desktop_process_, desktop_pipe, GetCurrentProcess(), |
- &temp_handle, 0, FALSE, DUPLICATE_SAME_ACCESS)) { |
+ pipe.Receive(), 0, FALSE, DUPLICATE_SAME_ACCESS)) { |
LOG_GETLASTERROR(ERROR) << "Failed to duplicate the desktop-to-network" |
" pipe handle"; |
@@ -240,7 +240,6 @@ |
base::CloseProcessHandle(desktop_process); |
return false; |
} |
- base::win::ScopedHandle pipe(temp_handle); |
IPC::ChannelHandle desktop_channel_handle(pipe); |