From: Michiharu Ariza Date: Tue, 4 Dec 2018 18:22:35 +0000 (-0800) Subject: more leak fixes X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b952e6026c8be13d16d97f464034ee477e6282f;p=platform%2Fupstream%2FlibHarfBuzzSharp.git more leak fixes --- diff --git a/src/hb-ot-cff1-table.hh b/src/hb-ot-cff1-table.hh index 4221bdd..181b0bc 100644 --- a/src/hb-ot-cff1-table.hh +++ b/src/hb-ot-cff1-table.hh @@ -1133,7 +1133,7 @@ struct cff1 { sc.end_processing (); topDict.fini (); - fontDicts.fini (); + fontDicts.fini_deep (); privateDicts.fini_deep (); hb_blob_destroy (blob); blob = nullptr; diff --git a/src/hb-ot-cff2-table.hh b/src/hb-ot-cff2-table.hh index 3c4191c..330c1a3 100644 --- a/src/hb-ot-cff2-table.hh +++ b/src/hb-ot-cff2-table.hh @@ -486,6 +486,7 @@ struct cff2 CFF2FontDict_Interpreter font_interp; font_interp.env.init (fontDictStr); font = fontDicts.push (); + if (font == &Crap(CFF2FontDictValues)) { fini (); return; } font->init (); if (unlikely (!font_interp.interpret (*font))) { fini (); return; } @@ -506,7 +507,7 @@ struct cff2 inline void fini (void) { sc.end_processing (); - fontDicts.fini (); + fontDicts.fini_deep (); privateDicts.fini_deep (); hb_blob_destroy (blob); blob = nullptr;