[FFmpeg-cvslog] compat/os2threads: Check av_malloc() return code

Michael Niedermayer git at videolan.org
Tue Jun 2 15:26:19 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Jun  2 15:16:45 2015 +0200| [ea9daefe9329519f6dd810cb3b56288b1c71747c] | committer: Michael Niedermayer

compat/os2threads: Check av_malloc() return code

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ea9daefe9329519f6dd810cb3b56288b1c71747c
---

 compat/os2threads.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/compat/os2threads.h b/compat/os2threads.h
index 441ac43..5b6ca55 100644
--- a/compat/os2threads.h
+++ b/compat/os2threads.h
@@ -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;



More information about the ffmpeg-cvslog mailing list