[subset/glyf] Fix another leak

This commit is contained in:
Behdad Esfahbod committed 2023-06-04 09:12:18 -06:00
1 parent 3d08a2f10c
commit 73f2f935a0
1 file changed
+5 -3
+5 -3
View File
@@ -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)