diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-26 23:50:40 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-06-07 21:42:24 +0200 |
commit | 9b76e49061a321467df23f7b1c8e8e715c8dec71 (patch) | |
tree | 68348819291cd5d38bac609e8eb5e5c21b4a515d | |
parent | 4ac7405aafb8e66dff2ac926f33b7ff755f224cf (diff) | |
download | ffmpeg-9b76e49061a321467df23f7b1c8e8e715c8dec71.tar.gz |
avcodec/vp8: Check cond init
Fixes: CID1598563 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/vp8.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 3e1f67172a..d6df018655 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -252,7 +252,11 @@ int update_dimensions(VP8Context *s, int width, int height, int is_vp7) free_buffers(s); return AVERROR(ret); } - pthread_cond_init(&s->thread_data[i].cond, NULL); + ret = pthread_cond_init(&s->thread_data[i].cond, NULL); + if (ret) { + free_buffers(s); + return AVERROR(ret); + } #endif } |