From 81640fdffe5a57191b392eda2d93fcf39183dbcf Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 23 Nov 2022 20:22:36 +0000 Subject: [PATCH] [subset] fix leaked font in glyf::subset(...) --- src/OT/glyf/glyf.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/OT/glyf/glyf.hh b/src/OT/glyf/glyf.hh index f714d793d..2633e7662 100644 --- a/src/OT/glyf/glyf.hh +++ b/src/OT/glyf/glyf.hh @@ -106,14 +106,15 @@ struct glyf } if (font) + { _free_compiled_subset_glyphs (&glyphs); + hb_font_destroy (font); + } if (unlikely (c->serializer->in_error ())) return_trace (false); return_trace (c->serializer->check_success (glyf_impl::_add_loca_and_head (c->plan, padded_offsets, use_short_loca))); - - hb_font_destroy (font); } void