diff options
Diffstat (limited to 'win')
-rw-r--r-- | win/win32service.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/win/win32service.cpp b/win/win32service.cpp index b04eff558..0a4b0c5b4 100644 --- a/win/win32service.cpp +++ b/win/win32service.cpp @@ -113,8 +113,9 @@ void SetServiceRunning() /** Starts the worker thread above */ void StartServiceThread() { - DWORD dwd; - CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)WorkerThread,NULL,0,&dwd); + HANDLE hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)WorkerThread,NULL,0,NULL); + if (hThread != NULL) + CloseHandle(hThread); } /** This function updates the status of the service in the SCM |