From d94569979114463f0951017c8b1ecccdb07824e0 Mon Sep 17 00:00:00 2001 From: casey Date: Thu, 8 Oct 2020 17:02:43 -0400 Subject: [PATCH] windows: fix WSA event destruction pt->events became an array --- lib/plat/windows/windows-init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/plat/windows/windows-init.c b/lib/plat/windows/windows-init.c index ddfa2b0d3..36778b62c 100644 --- a/lib/plat/windows/windows-init.c +++ b/lib/plat/windows/windows-init.c @@ -115,7 +115,9 @@ lws_plat_context_early_destroy(struct lws_context *context) int n = context->count_threads; while (n--) { - WSACloseEvent(pt->events); + int m; + for (m = 0; m < WSA_MAXIMUM_WAIT_EVENTS; m++) + WSACloseEvent(pt->events[m]); DeleteCriticalSection(&pt->interrupt_lock); pt++; }