[vlc-commits] commit: win32: fix memleak. (=?UTF-8?Q?R=C3=A9mi=20Duraffort=20?=)

git at videolan.org git at videolan.org
Wed Nov 24 18:02:11 CET 2010


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Nov 24 17:56:50 2010 +0100| [46676e7598448df74a34c5a45fb271a801497676] | committer: Rémi Duraffort 

win32: fix memleak.

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

 src/win32/thread.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/win32/thread.c b/src/win32/thread.c
index 9bcc645..a845585 100644
--- a/src/win32/thread.c
+++ b/src/win32/thread.c
@@ -474,7 +474,10 @@ int vlc_threadvar_create (vlc_threadvar_t *p_tls, void (*destr) (void *))
 
     var->id = TlsAlloc();
     if (var->id == TLS_OUT_OF_INDEXES)
+    {
+        free (var);
         return EAGAIN;
+    }
     var->destroy = destr;
     var->next = NULL;
     *p_tls = var;



More information about the vlc-commits mailing list