summaryrefslogtreecommitdiff
path: root/storage/innobase/os/os0thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/innobase/os/os0thread.cc')
-rw-r--r--storage/innobase/os/os0thread.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/innobase/os/os0thread.cc b/storage/innobase/os/os0thread.cc
index 48ee61e9402..9cc09a847b1 100644
--- a/storage/innobase/os/os0thread.cc
+++ b/storage/innobase/os/os0thread.cc
@@ -132,8 +132,10 @@ os_thread_create_func(
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;