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

This commit is contained in:
Sebastian Rasmussen 2020-06-28 11:09:45 +08:00 committed by GitHub
parent dbf9896e7a
commit a373e16131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

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;