[FFmpeg-devel] Found Two Mem Leaks. Patch attached.

Oliver Pfister oliver.pfister
Thu Jul 5 08:34:05 CEST 2007


Hi,

I found two mem. leaks:

1. In ffv1.c
------------

static int common_end(AVCodecContext *avctx){
    FFV1Context *s = avctx->priv_data;
    int i;

    for(i=0; i<s->plane_count; i++){
        PlaneContext *p= &s->plane[i];

        av_freep(&p->state);
	  av_freep(&p->vlc_state); // Add this line!!!!!!!
    }

    return 0;
}

2. In huffyuv.c
---------------

static int decode_end(AVCodecContext *avctx){
    HYuvContext *s = avctx->priv_data;
    int i;

    common_end(s);
    av_freep(&s->bitstream_buffer);

    for(i=0; i<6; i++){ // Change from 3 to 6 !!!!!!!!!!
        free_vlc(&s->vlc[i]);
    }

    return 0;
}

Cheers,
Oli 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.9.14/885 - Release Date: 03/07/2007
10:02
 
    
-------------- next part --------------
A non-text attachment was scrubbed...
Name: huffyuv.patch
Type: application/octet-stream
Size: 315 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070705/23b60389/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffv1.patch
Type: application/octet-stream
Size: 285 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070705/23b60389/attachment-0001.obj>



More information about the ffmpeg-devel mailing list