diff options
author | jsorg71 <jsorg71> | 2005-02-17 01:38:32 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2005-02-17 01:38:32 +0000 |
commit | 97b2519fd4b2445f0108f6458154d736a0a1191a (patch) | |
tree | ad8acbfcc90d26f67377aa7857d2246eda0305f9 /common | |
parent | aafcaa6a561d15eea6b6d323366919fc71c7218a (diff) | |
download | xrdp-proprietary-97b2519fd4b2445f0108f6458154d736a0a1191a.tar.gz xrdp-proprietary-97b2519fd4b2445f0108f6458154d736a0a1191a.zip |
fix thread leak, gota detach
Diffstat (limited to 'common')
-rw-r--r-- | common/os_calls.c | 5 |
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 |