[Spice-commits] vdagent/vdagent.cpp
Frediano Ziglio
fziglio at kemper.freedesktop.org
Tue May 23 15:35:32 UTC 2017
vdagent/vdagent.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit f80ee415c1793d1ab26901d32cc3fddd5293c2f7
Author: kunming.xie <kunming.xie at hotmail.com>
Date: Thu May 18 17:50:05 2017 +0800
Fix hdesk handle leak in vdagent
Signed-off-by: kunming.xie <kunming.xie at hotmail.com>
Acked-by: Frediano Ziglio <fziglio at redhat.com>
diff --git a/vdagent/vdagent.cpp b/vdagent/vdagent.cpp
index c25a077..6cb889f 100644
--- a/vdagent/vdagent.cpp
+++ b/vdagent/vdagent.cpp
@@ -423,6 +423,7 @@ void VDAgent::input_desktop_message_loop()
}
if (!SetThreadDesktop(hdesk)) {
vd_printf("SetThreadDesktop failed %lu", GetLastError());
+ CloseDesktop(hdesk);
_running = false;
return;
}
@@ -431,6 +432,7 @@ void VDAgent::input_desktop_message_loop()
} else {
vd_printf("GetUserObjectInformation failed %lu", GetLastError());
}
+ CloseDesktop(hdesk);
// loading the display settings for the current session's logged on user only
// after 1) we receive logon event, and 2) the desktop switched from Winlogon
@@ -479,7 +481,6 @@ void VDAgent::input_desktop_message_loop()
}
WTSUnRegisterSessionNotification(_hwnd);
DestroyWindow(_hwnd);
- CloseDesktop(hdesk);
}
void VDAgent::event_dispatcher(DWORD timeout, DWORD wake_mask)
More information about the Spice-commits
mailing list