Commit d611f5c6 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Android: do not screw up the signal mask on error

parent 031b7ba0
......@@ -290,6 +290,10 @@ static void *joinable_thread(void *data)
static int vlc_clone_attr (vlc_thread_t *th, void *(*entry) (void *),
void *data, bool detach)
{
vlc_thread_t thread = malloc (sizeof (*thread));
if (unlikely(thread == NULL))
return ENOMEM;
int ret;
sigset_t oldset;
......@@ -305,10 +309,6 @@ static int vlc_clone_attr (vlc_thread_t *th, void *(*entry) (void *),
pthread_sigmask (SIG_BLOCK, &set, &oldset);
}
vlc_thread_t thread = malloc (sizeof (*thread));
if (unlikely(thread == NULL))
return ENOMEM;
vlc_atomic_set(&thread->killed, false);
vlc_atomic_set(&thread->finished, false);
thread->killable = true;
......
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