fix leaks

This commit is contained in:
Michiharu Ariza 2018-11-01 10:31:21 -07:00
parent 049ce078e5
commit a9c305c2b0
2 changed files with 3 additions and 4 deletions

View File

@ -443,8 +443,8 @@ struct cff_subset_plan {
topdict_mod.fini ();
subset_fdselect_ranges.fini ();
fdmap.fini ();
subset_charstrings.fini ();
subset_globalsubrs.fini ();
subset_charstrings.fini_deep ();
subset_globalsubrs.fini_deep ();
subset_localsubrs.fini_deep ();
fontdicts_mod.fini ();
subset_enc_code_ranges.fini ();

View File

@ -129,16 +129,15 @@ struct CFF2CSOpSet_Flatten : CFF2CSOpSet<CFF2CSOpSet_Flatten, FlattenParam>
static inline void flatten_blends (const BlendArg &arg, unsigned int i, CFF2CSInterpEnv &env, FlattenParam& param)
{
/* flatten the default values */
StrEncoder encoder (param.flatStr);
for (unsigned int j = 0; j < arg.numValues; j++)
{
const BlendArg &arg1 = env.argStack[i + j];
assert (arg1.blending () && (arg.numValues == arg1.numValues) && (arg1.valueIndex == j) &&
(arg1.deltas.len == env.get_region_count ()));
StrEncoder encoder (param.flatStr);
encoder.encode_num (arg1);
}
/* flatten deltas for each value */
StrEncoder encoder (param.flatStr);
for (unsigned int j = 0; j < arg.numValues; j++)
{
const BlendArg &arg1 = env.argStack[i + j];