[subset/glyf] Fix another leak

pull/4264/head
Behdad Esfahbod 1 year ago
parent 3d08a2f10c
commit 73f2f935a0
  1. 8
      src/OT/glyf/glyf.hh

@ -102,8 +102,6 @@ struct glyf
if (font)
hb_font_destroy (font);
// Calculate glyph sizes for `loca` table
hb_vector_t<unsigned> padded_offsets;
if (unlikely (!padded_offsets.alloc (glyphs.length, true)))
{
@ -139,7 +137,11 @@ struct glyf
}
glyf *glyf_prime = c->serializer->start_embed <glyf> ();
if (unlikely (!glyf_prime)) return_trace (false);
if (unlikely (!glyf_prime))
{
_free_compiled_subset_glyphs (glyphs);
return_trace (false);
}
bool result = glyf_prime->serialize (c->serializer, hb_iter (glyphs), use_short_loca, c->plan);
if (c->plan->normalized_coords && !c->plan->pinned_at_default)

Loading…
Cancel
Save