Commit bb9e60e2 authored by Adrien Maglo's avatar Adrien Maglo

android thread: do not init the "finished" semaphore in the case of a detached thread.

This commit prevents the leak of the semaphore.
parent c47334a3
......@@ -372,8 +372,8 @@ static int vlc_clone_attr (vlc_thread_t *th, void *(*entry) (void *),
pthread_sigmask (SIG_BLOCK, &set, &oldset);
vlc_sem_init(&thread->finished, 0);
if (!detach)
vlc_sem_init(&thread->finished, 0);
atomic_store(&thread->killed, false);
thread->killable = true;
thread->cond = NULL;
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