From e7a045e4db39e037badcab0ad1239c0cb56c1170 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Thu, 4 Oct 2018 14:16:07 -0700 Subject: [PATCH] fixed leak exposed by test-ot-extents-cff --- src/hb-cff-interp-common.hh | 3 +++ src/hb-cff-interp-dict-common.hh | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/hb-cff-interp-common.hh b/src/hb-cff-interp-common.hh index ed3c6f0b8..0870f45df 100644 --- a/src/hb-cff-interp-common.hh +++ b/src/hb-cff-interp-common.hh @@ -627,6 +627,9 @@ struct ArgStack : Stack /* an operator prefixed by its operands in a byte string */ struct OpStr { + inline void init (void) {} + inline void fini (void) {} + OpCode op; ByteStr str; }; diff --git a/src/hb-cff-interp-dict-common.hh b/src/hb-cff-interp-dict-common.hh index 21db5fd46..1c7d28f62 100644 --- a/src/hb-cff-interp-dict-common.hh +++ b/src/hb-cff-interp-dict-common.hh @@ -64,6 +64,10 @@ struct DictValues inline void fini (void) { + for (unsigned int i = 0; i < values.len; i++) + { + values[i].fini (); + } values.fini (); }