[vlc-commits] Win32 threads: fix memory leak of detached thread

Hannes Domani git at videolan.org
Thu Aug 28 21:11:28 CEST 2014


vlc | branch: master | Hannes Domani <ssbssa at yahoo.de> | Thu Aug 28 13:22:33 2014 +0200| [b1f9242606caf549a03c6b11b00c66c2c1af27cb] | committer: Jean-Baptiste Kempf

Win32 threads: fix memory leak of detached thread

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b1f9242606caf549a03c6b11b00c66c2c1af27cb
---

 src/win32/thread.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/win32/thread.c b/src/win32/thread.c
index ed3c4f9..fe17ad5 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -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;
 



More information about the vlc-commits mailing list