[vdagent-win PATCH 2/4] Close agent thread handle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is not needed so we can close it

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 vdservice/vdservice.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vdservice/vdservice.cpp b/vdservice/vdservice.cpp
index e9bf1a2..3de8111 100644
--- a/vdservice/vdservice.cpp
+++ b/vdservice/vdservice.cpp
@@ -729,6 +729,8 @@ bool VDService::launch_agent()
         vd_printf("CreateProcess() failed: %lu", GetLastError());
         return false;
     }
+    CloseHandle(_agent_proc_info.hThread);
+    _agent_proc_info.hThread = NULL;
     _agent_alive = true;
     return true;
 }
@@ -769,7 +771,6 @@ bool VDService::kill_agent()
     }
     ResetEvent(_agent_stop_event);
     CloseHandle(proc_handle);
-    CloseHandle(_agent_proc_info.hThread);
     ZeroMemory(&_agent_proc_info, sizeof(_agent_proc_info));
     return ret;
 }
-- 
2.9.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]