Commit 49cadc91 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-361 - Fix handle leak in os_thread_create (Windows)

parent 166d4c1f
......@@ -136,8 +136,10 @@ os_thread_create(
if (thread_id) {
*thread_id = win_thread_id;
}
return(thread);
if (thread) {
CloseHandle(thread);
}
return((os_thread_t)win_thread_id);
#else
int ret;
os_thread_t pthread;
......
......@@ -136,8 +136,10 @@ os_thread_create(
if (thread_id) {
*thread_id = win_thread_id;
}
return(thread);
if (thread) {
CloseHandle(thread);
}
return((os_thread_t)win_thread_id);
#else
int ret;
os_thread_t pthread;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment