]> git.sesse.net Git - vlc/commitdiff
Win32 threads: fix memory leak of detached thread
authorHannes Domani <ssbssa@yahoo.de>
Thu, 28 Aug 2014 11:22:33 +0000 (13:22 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Thu, 28 Aug 2014 19:07:44 +0000 (21:07 +0200)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
src/win32/thread.c

index ed3c4f90d721810f05394fa67fb18bca240261df..fe17ad50e84ad4defc58e3685d1e38a26098aa78 100644 (file)
@@ -503,7 +503,10 @@ static int vlc_clone_attr (vlc_thread_t *p_handle, bool detached,
     }
 
     if (detached)
+    {
         CloseHandle((HANDLE)h);
+        th->id = NULL;
+    }
     else
         th->id = (HANDLE)h;