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

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


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

Win32 threads: fix memory leak of detached thread

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit b1f9242606caf549a03c6b11b00c66c2c1af27cb)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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