summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2005-02-17 01:38:32 +0000
committerjsorg71 <jsorg71>2005-02-17 01:38:32 +0000
commit97b2519fd4b2445f0108f6458154d736a0a1191a (patch)
treead8acbfcc90d26f67377aa7857d2246eda0305f9 /common
parentaafcaa6a561d15eea6b6d323366919fc71c7218a (diff)
downloadxrdp-proprietary-97b2519fd4b2445f0108f6458154d736a0a1191a.tar.gz
xrdp-proprietary-97b2519fd4b2445f0108f6458154d736a0a1191a.zip
fix thread leak, gota detach
Diffstat (limited to 'common')
-rw-r--r--common/os_calls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/common/os_calls.c b/common/os_calls.c
index e236088c..095ff4fd 100644
--- a/common/os_calls.c
+++ b/common/os_calls.c
@@ -590,8 +590,11 @@ int g_thread_create(unsigned long (__stdcall * start_routine)(void*), void* arg)
int g_thread_create(void* (* start_routine)(void*), void* arg)
{
pthread_t thread;
+ int rv;
- return pthread_create(&thread, 0, start_routine, arg);
+ rv = pthread_create(&thread, 0, start_routine, arg);
+ pthread_detach(thread);
+ return rv;
}
#endif