[vlc-devel] commit: threads: fix leaks on error path (Pierre Ynard )

git version control git at videolan.org
Thu Aug 13 13:13:27 CEST 2009


vlc | branch: master | Pierre Ynard <linkfanel at yahoo.fr> | Thu Aug 13 13:12:34 2009 +0200| [9ee093515ab379c5215e243b07563a9e8f5fb40d] | committer: Pierre Ynard 

threads: fix leaks on error path

Fix memleak + event leak on wince if thread creation fails

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

 src/misc/w32thread.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/misc/w32thread.c b/src/misc/w32thread.c
index 8f04a3d..7e2611f 100644
--- a/src/misc/w32thread.c
+++ b/src/misc/w32thread.c
@@ -480,6 +480,11 @@ int vlc_clone (vlc_thread_t *p_handle, void * (*entry) (void *), void *data,
             SetThreadPriority (hThread, priority);
         return 0;
     }
+
+#ifdef UNDER_CE
+    CloseHandle (th->cancel_event);
+#endif
+    free (entry_data);
     return errno;
 }
 




More information about the vlc-devel mailing list