compat/os2threads: Check av_malloc() return code
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 2 Jun 2015 13:16:45 +0000 (15:16 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 2 Jun 2015 13:16:45 +0000 (15:16 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
compat/os2threads.h

index 441ac43..5b6ca55 100644 (file)
@@ -66,6 +66,8 @@ static av_always_inline int pthread_create(pthread_t *thread, const pthread_attr
     struct thread_arg *thread_arg;
 
     thread_arg = av_mallocz(sizeof(struct thread_arg));
+    if (!thread_arg)
+        return ENOMEM;
 
     thread_arg->start_routine = start_routine;
     thread_arg->arg = arg;