avfilter/vsrc_mandelbrot: Check for malloc failure

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/5.1
Michael Niedermayer 3 years ago
parent 70db14376c
commit fbd22504c4
  1. 3
      libavfilter/vsrc_mandelbrot.c

@ -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;
}

Loading…
Cancel
Save