From a373e16131ecc79be47edaaddc528efc6b411752 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sun, 28 Jun 2020 11:09:45 +0800 Subject: [PATCH] [ot-shape] Free shape plan maps upon error creating data (#2497) --- src/hb-ot-shape.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hb-ot-shape.cc b/src/hb-ot-shape.cc index 00ecdfab3..2d20dd3da 100644 --- a/src/hb-ot-shape.cc +++ b/src/hb-ot-shape.cc @@ -220,7 +220,13 @@ hb_ot_shape_plan_t::init0 (hb_face_t *face, { data = shaper->data_create (this); if (unlikely (!data)) + { + map.fini (); +#ifndef HB_NO_AAT_SHAPE + aat_map.fini (); +#endif return false; + } } return true;