On 3/6/18, James Almer <jamr...@gmail.com> wrote: > This prevents leaks in the rare cases the function is called when extradata > already exists. > > Signed-off-by: James Almer <jamr...@gmail.com> > --- > libavformat/utils.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavformat/utils.c b/libavformat/utils.c > index 72531d4185..31340a484b 100644 > --- a/libavformat/utils.c > +++ b/libavformat/utils.c > @@ -3245,6 +3245,7 @@ int ff_alloc_extradata(AVCodecParameters *par, int > size) > { > int ret; > > + av_freep(&par->extradata); > if (size < 0 || size >= INT32_MAX - AV_INPUT_BUFFER_PADDING_SIZE) { > par->extradata = NULL; > par->extradata_size = 0; > -- > 2.16.2 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >
lgtm _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel