fixed leaks in CFF subr subset
diff --git a/src/hb-ot-cff-common.hh b/src/hb-ot-cff-common.hh
index b360e65..b98119f 100644
--- a/src/hb-ot-cff-common.hh
+++ b/src/hb-ot-cff-common.hh
@@ -62,8 +62,13 @@
};
typedef hb_vector_t<char, 1> StrBuff;
-struct StrBuffArray : hb_vector_t<StrBuff>
+struct StrBuffArray : hb_vector_t<StrBuff>
{
+ inline void fini (void)
+ {
+ SUPER::fini_deep ();
+ }
+
inline unsigned int total_size (void) const
{
unsigned int size = 0;
@@ -71,6 +76,9 @@
size += (*this)[i].len;
return size;
}
+
+ private:
+ typedef hb_vector_t<StrBuff> SUPER;
};
/* CFF INDEX */
diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh
index 91fa5ed..8631d2b 100644
--- a/src/hb-subset-cff-common.hh
+++ b/src/hb-subset-cff-common.hh
@@ -465,11 +465,19 @@
{
inline void init (unsigned int len_ = 0)
{
- hb_vector_t<ParsedCStr>::init ();
+ SUPER::init ();
resize (len_);
for (unsigned int i = 0; i < len; i++)
(*this)[i].init ();
}
+
+ inline void fini (void)
+ {
+ SUPER::fini_deep ();
+ }
+
+ private:
+ typedef hb_vector_t<ParsedCStr> SUPER;
};
struct SubrSubsetParam