[Mplayer-cvslog] CVS: main/libmpcodecs dec_audio.c,1.26,1.27

Alex Beregszaszi alex at fsn.hu
Wed Sep 3 11:32:57 CEST 2003


Hi,

> > @@ -257,6 +257,7 @@
> >      if(sh_audio->afilter){
> >  	mp_msg(MSGT_DECAUDIO,MSGL_V,"Uninit audio filters...\n");
> >  	af_uninit(sh_audio->afilter);
> > +	free(sh_audio->afilter);
> >  	sh_audio->afilter=NULL;
> 
> are you sure this is ok?
> afair libaf;'s af_uninit() already free's all that up
> so this woudl result a double free which is worse than a memleak
No, af_uninit doesn't frees that, there was only a patch for that, but I
decided to free it in the caller, becouse the afilter is allocated in
the caller too (af_init needs a valid memory pointer)

-- 
Alex Beregszaszi <alex at fsn.hu>
(MPlayer Core Developer -- http://www.mplayerhq.hu/)



More information about the MPlayer-cvslog mailing list