avfilter/vsrc_mandelbrot: Check for malloc failure

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fbd22504c4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2022-04-21 22:45:12 +02:00
parent 3ba5221129
commit 7315e3ced5
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
1 changed files with 3 additions and 0 deletions

View File

@ -134,6 +134,9 @@ static av_cold int init(AVFilterContext *ctx)
s-> next_cache= av_malloc_array(s->cache_allocated, sizeof(*s-> next_cache));
s-> zyklus = av_malloc_array(s->maxiter + 16, sizeof(*s->zyklus));
if (!s->point_cache || !s->next_cache || !s->zyklus)
return AVERROR(ENOMEM);
return 0;
}