[FFmpeg-devel] One memory leakage in Mov parser

Baptiste Coudurier baptiste.coudurier
Wed Jun 18 10:32:17 CEST 2008


Hi,

David LIU wrote:
> Hi All,
> 
> There is memory leakage during Mov reading head. In mov_read_trak() in libavformat/mov.c, 
> static int mov_read_trak(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
> {
> ...
> sc = av_mallocz(sizeof(MOVStreamContext)); <- not freed later
> ...
> }
> 
> What I fix is in 
> static int mov_read_close(AVFormatContext *s)
> {
> ...
> av_freep(&sc); //david added to fix memory leakage
> ...
> }
> 
> I attached my mov.c here.
> 

Yes, issue fixed. Thanks.

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA




More information about the ffmpeg-devel mailing list