[ot-shape] Free shape plan maps upon error creating data (#2497)

This commit is contained in:
Sebastian Rasmussen authored and GitHub committed 2020-06-27 20:09:45 -07:00
1 parent dbf9896e7a
commit a373e16131
1 file changed
+6
+6
View File
@@ -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;