From: Behdad Esfahbod Date: Wed, 29 Aug 2012 13:37:50 +0000 (-0400) Subject: Plug leak X-Git-Tag: 1.31.1~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e6563310424563f60d8acebc093c7e1d7a2fa58b;p=platform%2Fupstream%2Fpango.git Plug leak --- diff --git a/modules/basic/basic-fc.c b/modules/basic/basic-fc.c index d757127..1def055 100644 --- a/modules/basic/basic-fc.c +++ b/modules/basic/basic-fc.c @@ -305,6 +305,7 @@ basic_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED, PangoFcHbContext context; PangoFcFont *fc_font; FT_Face ft_face; + hb_face_t *hb_face; hb_font_t *hb_font; hb_buffer_t *hb_buffer; hb_direction_t hb_direction; @@ -330,7 +331,8 @@ basic_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED, context.fc_font = fc_font; context.vertical = PANGO_GRAVITY_IS_VERTICAL (analysis->gravity); context.improper_sign = PANGO_GRAVITY_IS_IMPROPER (analysis->gravity) ? -1 : +1; - hb_font = hb_font_create (hb_ft_face_create_cached (ft_face)); + hb_face = hb_ft_face_create_cached (ft_face); + hb_font = hb_font_create (hb_face); hb_font_set_funcs (hb_font, pango_fc_get_hb_font_funcs (), &context, @@ -409,6 +411,7 @@ basic_engine_shape (PangoEngineShape *engine G_GNUC_UNUSED, release_buffer (hb_buffer, free_buffer); hb_font_destroy (hb_font); + hb_face_destroy (hb_face); pango_fc_font_unlock_face (fc_font); }