mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
MDEV-361 - Fix handle leak in os_thread_create (Windows)
This commit is contained in:
parent
166d4c1feb
commit
49cadc9114
2 changed files with 8 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue