diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2016-12-14 09:41:41 +0000 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2017-07-08 08:23:16 +0100 |
commit | 143f6e55ee3701dfb8e8faf743cc5a5d8ab7b0c8 (patch) | |
tree | ca5c87b589fad59015b38782cc96ef0be13a7b66 | |
parent | cf829d09ef2a5707a6e4e677f50d41beff508aa9 (diff) |
Close agent thread handle
This is not needed so we can close it
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
-rw-r--r-- | vdservice/vdservice.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |