From ffa7c709e19242bf9ef118bec5367020ae9e6387 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Thu, 21 May 2009 22:17:39 +0000 Subject: [PATCH] core: fix handle leak in switch_thread_self on windows (FSCORE-371) git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13421 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_apr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/switch_apr.c b/src/switch_apr.c index 55ddea5cd0..e2e33554b7 100644 --- a/src/switch_apr.c +++ b/src/switch_apr.c @@ -71,7 +71,11 @@ SWITCH_DECLARE(switch_thread_id_t) switch_thread_self(void) { +#ifndef WIN32 return apr_os_thread_current(); +#else + return (GetCurrentThreadId()); +#endif } SWITCH_DECLARE(void) switch_pool_clear(switch_memory_pool_t *p)