[FFmpeg-devel] [PATCH 1/2] lavfi: check for allocation failure in ff_insert_pad()

Carl Eugen Hoyos cehoyos at ag.or.at
Thu Jul 11 00:32:36 CEST 2013


Paul B Mahol <onemda <at> gmail.com> writes:

> +    *pads  = av_realloc_f(*pads, *count + 1, sizeof(AVFilterPad));
> +    *links = av_realloc_f(*links, *count + 1, sizeof(AVFilterLink*));
> +    if (!*pads || !*links)
> +        return AVERROR(ENOMEM);

You could avaoid a memleak here.

Carl Eugen



More information about the ffmpeg-devel mailing list