[subset/cbdt] Release the referenced cbdt table on error

Just accidentally spotted it, when the table has less than 4 bytes
This commit is contained in:
Ebrahim Byagowi 2020-03-08 00:47:25 +03:30
parent 0d729b4b72
commit bdf372b24c
1 changed files with 5 additions and 1 deletions

View File

@ -955,7 +955,11 @@ CBLC::subset (hb_subset_context_t *c) const
hb_blob_t* cbdt_blob = hb_sanitize_context_t ().reference_table<CBDT> (c->plan->source);
unsigned int cbdt_length;
CBDT* cbdt = (CBDT *) hb_blob_get_data (cbdt_blob, &cbdt_length);
if (unlikely (cbdt_length < CBDT::min_size)) return_trace (false);
if (unlikely (cbdt_length < CBDT::min_size))
{
hb_blob_destroy (cbdt_blob);
return_trace (false);
}
_copy_data_to_cbdt (&cbdt_prime, cbdt, CBDT::min_size);
for (const BitmapSizeTable& table : + sizeTables.iter ())