mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-13 16:50:38 +00:00
[subset/cff1] Fix resource leak in error case
This commit is contained in:
parent
e310473cec
commit
9dbea6071a
1 changed files with 10 additions and 10 deletions
|
@ -492,16 +492,6 @@ struct cff1_subset_plan
|
|||
return;
|
||||
}
|
||||
|
||||
hb_vector_t<uint16_t> *glyph_to_sid_map = acc.cff_accelerator ?
|
||||
acc.cff_accelerator->glyph_to_sid_map.get_acquire () :
|
||||
nullptr;
|
||||
bool created_map = false;
|
||||
if (!glyph_to_sid_map && acc.cff_accelerator)
|
||||
{
|
||||
created_map = true;
|
||||
glyph_to_sid_map = acc.create_glyph_to_sid_map ();
|
||||
}
|
||||
|
||||
code_pair_t glyph_to_sid_cache {0, HB_CODEPOINT_INVALID};
|
||||
|
||||
unsigned int glyph;
|
||||
|
@ -514,6 +504,16 @@ struct cff1_subset_plan
|
|||
return;
|
||||
}
|
||||
|
||||
hb_vector_t<uint16_t> *glyph_to_sid_map = acc.cff_accelerator ?
|
||||
acc.cff_accelerator->glyph_to_sid_map.get_acquire () :
|
||||
nullptr;
|
||||
bool created_map = false;
|
||||
if (!glyph_to_sid_map && acc.cff_accelerator)
|
||||
{
|
||||
created_map = true;
|
||||
glyph_to_sid_map = acc.create_glyph_to_sid_map ();
|
||||
}
|
||||
|
||||
auto it = hb_iter (plan->new_to_old_gid_list);
|
||||
if (it->first == 0) it++;
|
||||
auto _ = *it;
|
||||
|
|
Loading…
Add table
Reference in a new issue