]> git.sesse.net Git - vlc/commitdiff
* src/misc/threads.c: fixed long standing win32 thread handles leak.
authorGildas Bazin <gbazin@videolan.org>
Wed, 14 Jul 2004 10:21:21 +0000 (10:21 +0000)
committerGildas Bazin <gbazin@videolan.org>
Wed, 14 Jul 2004 10:21:21 +0000 (10:21 +0000)
src/misc/threads.c

index 789587722aba8eae1d21f391653c8bebb8ddb3a6..ceee3f7a4a64daeac859a1e8cf5c5429cad5acaa 100644 (file)
@@ -2,7 +2,7 @@
  * threads.c : threads implementation for the VideoLAN client
  *****************************************************************************
  * Copyright (C) 1999-2004 VideoLAN
- * $Id: threads.c,v 1.47 2004/02/22 15:41:27 massiot Exp $
+ * $Id$
  *
  * Authors: Jean-Marc Dressler <polux@via.ecp.fr>
  *          Samuel Hocevar <sam@zoy.org>
@@ -706,11 +706,9 @@ void __vlc_thread_join( vlc_object_t *p_this, char * psz_file, int i_line )
 #elif defined( ST_INIT_IN_ST_H )
     i_ret = st_thread_join( p_this->thread_id, NULL );
 
-#elif defined( UNDER_CE )
-    WaitForSingleObject( p_this->thread_id, INFINITE );
-
-#elif defined( WIN32 )
+#elif defined( UNDER_CE ) || defined( WIN32 )
     WaitForSingleObject( p_this->thread_id, INFINITE );
+    CloseHandle( p_this->thread_id );
 
 #elif defined( HAVE_KERNEL_SCHEDULER_H )
     int32_t exit_value;