[subset] fix memory leak.
Fixes fuzzer issue https://oss-fuzz.com/testcase-detail/6169920089227264
This commit is contained in:
parent
453ded0539
commit
2cd81fdfb6
|
@ -386,11 +386,12 @@ _collect_layout_variation_indices (hb_subset_plan_t* plan)
|
||||||
if (collect_delta)
|
if (collect_delta)
|
||||||
{
|
{
|
||||||
if (unlikely (!plan->check_success (font = _get_hb_font_with_variations (plan)))) {
|
if (unlikely (!plan->check_success (font = _get_hb_font_with_variations (plan)))) {
|
||||||
|
hb_font_destroy (font);
|
||||||
gdef.destroy ();
|
gdef.destroy ();
|
||||||
gpos.destroy ();
|
gpos.destroy ();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gdef->has_var_store ())
|
if (gdef->has_var_store ())
|
||||||
{
|
{
|
||||||
var_store = &(gdef->get_var_store ());
|
var_store = &(gdef->get_var_store ());
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue