[vlc-commits] Android: do not screw up the signal mask on error
Rémi Denis-Courmont
git at videolan.org
Fri Oct 12 21:37:01 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Oct 12 22:22:58 2012 +0300| [d611f5c69e028baa4e69c08186642655687e0d9d] | committer: Rémi Denis-Courmont
Android: do not screw up the signal mask on error
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d611f5c69e028baa4e69c08186642655687e0d9d
---
src/android/thread.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/android/thread.c b/src/android/thread.c
index c98da13..e6efa7c 100644
--- a/src/android/thread.c
+++ b/src/android/thread.c
@@ -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;
More information about the vlc-commits
mailing list