[MPlayer-dev-eng] [PATCH] fix a memleak on sub_font, it was never freed

Ulion ulion2002 at gmail.com
Wed Dec 26 09:30:10 CET 2007


2007/12/24, Ulion <ulion2002 at gmail.com>:
> 2007/12/22, Guillaume LECERF <foxcore at gmail.com>:
> > Hi all,
> >
> > This patch does $subject.
>
> There are more leak on the vo_font and sub_font, they'd better be
> fixed all together.
> There are two font module could using vo_font and sub_font, one for
> bitmap, one for freetype, they share same struct type font_desc_t. The
> two font module could be enabled at the same time (normal case), and
> the font load by freetype module will override font loaded by bitmap
> module without free.
> And font loaded by bitmap will not be free when freetype not enabled
> (maybe never get free since the freetype could possibly always
> override bitmap font), the free function for font_desc_t only
> available when freetype enabled, these should all be fixed. When
> change subfont size, it reload fonts, and will not do any free again,
> etc.

And sometimes sub_font just pointing to vo_font, you have to take good
care of it to prevent double free.

-- 
Ulion



More information about the MPlayer-dev-eng mailing list