[Ffmpeg-devel] [PATCH] Memory leaks...
Martin Boehme
boehme
Tue Sep 27 15:28:31 CEST 2005
Mat wrote:
> Patch from CVS 2005_09_27
>
> Some notes:
[snip]
> - about mpegaudiodec.c ... I noticed the leak with apiexample.c
> probably because mpegaudiodec is used there. I already proposed to
> explicity clean the memory in the local scope adding
> av_free(code_table); before closing the for in the row 372. I tested it
> and it works (no leaks) but I'm not sure of this change so I didn't
> include it in the patch. Martin knows this
Just for the record: I'm not an FFmpeg developer (in case you got that
impression), so I'm probably not competent to comment on this. However,
the fix you propose looks wrong to me because code_table gets assigned
to the global variable huff_code_table[i]. So we don't want to free this
memory because it's going to get used well beyond the lifetime of that loop.
Martin
--
Martin B?hme
Inst. f. Neuro- and Bioinformatics
Ratzeburger Allee 160, D-23538 Luebeck
Phone: +49 451 500 5514
Fax: +49 451 500 5502
boehme at inb.uni-luebeck.de
More information about the ffmpeg-devel
mailing list