diff options
-rw-r--r-- | src/c11/impl/threads_win32.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/c11/impl/threads_win32.c b/src/c11/impl/threads_win32.c index 08c9475d81c..5d78542dab4 100644 --- a/src/c11/impl/threads_win32.c +++ b/src/c11/impl/threads_win32.c @@ -319,6 +319,7 @@ thrd_create(thrd_t *thr, thrd_start_t func, void *arg) pack->arg = arg; handle = _beginthreadex(NULL, 0, impl_thrd_routine, pack, 0, NULL); if (handle == 0) { + free(pack); if (errno == EAGAIN || errno == EACCES) return thrd_nomem; return thrd_error; |