From 66b0a390793ab06692dd49e67baef52a6a7d82aa Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Fri, 23 Feb 2018 15:41:52 -0800 Subject: [PATCH] [subset] Fix memory leak in hb-subset. --- src/hb-subset.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/hb-subset.cc b/src/hb-subset.cc index aff3aecc6..3a0ddb036 100644 --- a/src/hb-subset.cc +++ b/src/hb-subset.cc @@ -263,14 +263,11 @@ _subset_table (hb_subset_plan_t *plan, break; default: hb_blob_t *source_table = hb_face_reference_table(plan->source, tag); - if (likely(source_table)) - { + if (likely (source_table)) result = hb_subset_plan_add_table(plan, tag, source_table); - } else - { result = false; - } + hb_blob_destroy (source_table); break; } DEBUG_MSG(SUBSET, nullptr, "subset %c%c%c%c %s", HB_UNTAG(tag), result ? "ok" : "FAILED");