[FFmpeg-devel] [PATCH] Fix memory leak while opening input JPG that doesn't exist

Carl Eugen Hoyos cehoyos
Tue Aug 10 19:30:00 CEST 2010


Michael Niedermayer <michaelni <at> gmx.at> writes:

> > --- libavformat/utils.c (wersja 24571)
> > +++ libavformat/utils.c (kopia robocza)
> > @@ -474,6 +474,7 @@
> >              if (st) {
> >                  av_free(st->priv_data);
> >                  av_free(st->codec->extradata);
> > +                av_free(st->codec);
> >              }
> >              av_free(st);
> >          }
> >
> 
> looks ok

I applied the patch since it definitely fixes the mem-leak described in issue
2126 (and I don't understand how the image2 demuxer can allocate chapter and
index for non-existing files).

Feel free to flame me, Carl Eugen





More information about the ffmpeg-devel mailing list