[vlc-devel] [vlc-commits] freetype: fix crash (wrong memory deallocation)
Laurent Aimar
fenrir at elivagar.org
Mon Sep 12 11:31:16 CEST 2011
On Mon, Sep 12, 2011 at 11:27:09AM +0200, Erwan Tulou wrote:
> vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Sat Sep 10 00:25:55 2011 +0200| [2224fa034a7a205ba9ec810e67e2889a2bca4471] | committer: Erwan Tulou
>
> freetype: fix crash (wrong memory deallocation)
>
> shadow refers to outine or glyph. Only these latter ones need deallocation.
I don't think so. Unless I misread the freetype API they also need deallocation.
FT_Glyph shadow = NULL;
if( p_filter->p_sys->i_shadow_opacity > 0 )
{
shadow = outline ? outline : glyph;
FT_Glyph_To_Bitmap( &shadow, FT_RENDER_MODE_NORMAL, p_pen_shadow, 0 );
FT_Glyph_Get_CBox( shadow, ft_glyph_bbox_pixels, p_shadow_bbox );
}
*pp_shadow = shadow;
The result of FT_Glyph_To_Bitmap need deallocation I think:
http://www.freetype.org/freetype2/docs/reference/ft2-glyph_management.html#FT_Glyph_To_Bitmap
--
fenrir
More information about the vlc-devel
mailing list