Commit 46676e75 authored by Rémi Duraffort's avatar Rémi Duraffort

win32: fix memleak.

parent 7ba20d42
...@@ -474,7 +474,10 @@ int vlc_threadvar_create (vlc_threadvar_t *p_tls, void (*destr) (void *)) ...@@ -474,7 +474,10 @@ int vlc_threadvar_create (vlc_threadvar_t *p_tls, void (*destr) (void *))
var->id = TlsAlloc(); var->id = TlsAlloc();
if (var->id == TLS_OUT_OF_INDEXES) if (var->id == TLS_OUT_OF_INDEXES)
{
free (var);
return EAGAIN; return EAGAIN;
}
var->destroy = destr; var->destroy = destr;
var->next = NULL; var->next = NULL;
*p_tls = var; *p_tls = var;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment