c11: Fixes memory leak of pack in thrd_create on win32
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com> Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15087>
This commit is contained in:
parent
e6392fcf3d
commit
09cd5c9bdb
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue