Fixes: CID1598556 Unchecked return value
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -247,7 +247,11 @@ int update_dimensions(VP8Context *s, int width, int height, int is_vp7) · 246 unmodified lines | ||
| 247 | 247 | return AVERROR(ENOMEM); |
| 248 | 248 | } |
| 249 | 249 | #if HAVE_THREADS |
| 250 | − pthread_mutex_init(&s->thread_data[i].lock, NULL); | |
| 250 | + ret = pthread_mutex_init(&s->thread_data[i].lock, NULL); | |
| 251 | + if (ret) { | |
| 252 | + free_buffers(s); | |
| 253 | + return AVERROR(ret); | |
| 254 | + } | |
| 251 | 255 | pthread_cond_init(&s->thread_data[i].cond, NULL); |
| 252 | 256 | #endif |
| 253 | 257 | } |