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

Michel Bardiaux mbardiaux
Thu Jul 5 12:08:11 CEST 2007


Oliver Pfister wrote:
> 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;
> }
> 
Didnt you see my reply? Posting the same thing twice will only get you 
plonked...

-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/




More information about the ffmpeg-devel mailing list