Skip to content
Snippets Groups Projects
Commit 1c613896 authored by Steve Lhomme's avatar Steve Lhomme Committed by Rémi Denis-Courmont
Browse files

libvlc: ensure that vlc_threadvar_set() is set on a proper thread var

If there's an error, the value we set is not actually set. Maybe an old value
is still in there or the variable is gone or something else is blocking.

We can't use the new value in the future and we don't know if the old value is
still in there.
parent 8a88f100
No related branches found
No related tags found
No related merge requests found
......@@ -89,7 +89,9 @@ const char *libvlc_errmsg (void)
void libvlc_clearerr (void)
{
free_error ();
vlc_threadvar_set (context, NULL);
int ret = vlc_threadvar_set (context, NULL);
if(unlikely(ret != 0))
abort();
}
/**
......@@ -106,7 +108,9 @@ const char *libvlc_vprinterr (const char *fmt, va_list ap)
msg = (char *)oom;
free_error ();
vlc_threadvar_set (context, msg);
int ret = vlc_threadvar_set (context, msg);
if(unlikely(ret != 0))
abort();
return msg;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment