[return checks] fix use of CloseHandle

This commit is contained in:
akallabeth
2024-09-16 04:58:36 +02:00
parent cd18dea174
commit 965d231e49
113 changed files with 288 additions and 290 deletions

View File

@@ -307,7 +307,7 @@ static UINT echo_server_open(echo_server_context* context)
if (!(echo->thread = CreateThread(NULL, 0, echo_server_thread_func, (void*)echo, 0, NULL)))
{
WLog_ERR(TAG, "CreateEvent failed!");
CloseHandle(echo->stopEvent);
(void)CloseHandle(echo->stopEvent);
echo->stopEvent = NULL;
return ERROR_INTERNAL_ERROR;
}
@@ -337,8 +337,8 @@ static UINT echo_server_close(echo_server_context* context)
return error;
}
CloseHandle(echo->thread);
CloseHandle(echo->stopEvent);
(void)CloseHandle(echo->thread);
(void)CloseHandle(echo->stopEvent);
echo->thread = NULL;
echo->stopEvent = NULL;
}