[FFmpeg-devel] [PATCH] libavcodec/h264.c memleak bugfix
Zdenek Kabelac
zdenek.kabelac
Fri Jan 25 15:17:14 CET 2008
2008/1/25, Michael Niedermayer <michaelni at gmx.at>:
> On Fri, Jan 25, 2008 at 01:17:25PM +0100, Zdenek Kabelac wrote:
> > 2008/1/25, Michael Niedermayer <michaelni at gmx.at>:
> > > On Fri, Jan 25, 2008 at 12:16:46PM +0100, Zdenek Kabelac wrote:
> > > > Hi
> > > >
> > > > context_init seems to overwrite already allocated allocated_edge_emu_buffer.
> > > > So this patch frees it before it gets reallocated.
> > >
> > > rejected, your patch possibly introduces a double free
> > > the allocated_edge_emu_buffer issue was discussed recently RTF(mailinglist)
> >
> > So may I assume you will fix this leak yourself ?
>
> no
>
>
> > (reference counting??)
>
> ROTFL
>
Am I missing some point here ?
Obviously there is memory leak during the h264 codec initialization
sequence when MPV_common_init allocates edge buffer and then
context_init from h264 rewrites this value.
I believe you are the h264 maintainer & expert so you should probably
know some better places where the edge should be released during the
initialization if my patch leads to double-free risk (I definitively
do not know internal details of h264) - so who else should know how to
fix it ??
So what is so funny about this actually ??
Do you think the current code is correct ?
Zdenek
More information about the ffmpeg-devel
mailing list