From ca5d8ad8f04053cc0e65cf173965eada7519a8b7 Mon Sep 17 00:00:00 2001 From: Kevin Trogant Date: Wed, 24 Jul 2024 16:42:22 +0200 Subject: [PATCH] fix(runtime): Use NULL when invalidating a win32 file handle --- src/runtime/rt_aio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/rt_aio.c b/src/runtime/rt_aio.c index a65baab..999a3b6 100644 --- a/src/runtime/rt_aio.c +++ b/src/runtime/rt_aio.c @@ -364,7 +364,7 @@ static void win32WriteBatchInner(const char *file_path, const rt_file_write *wri op->state = RT_AIO_STATE_FINISHED; *handle = RT_AIO_INVALID_HANDLE; CloseHandle(file_handle); - op->file_handle = INVALID_HANDLE; + op->file_handle = NULL; } /* Handle is the index into the ringbuffer + 1 */