[subset] Fix blob leak of _subset2 when returns early
Fixes https://crbug.com/oss-fuzz/16639
This commit is contained in:
parent
541f3c2d7d
commit
28aba780c4
|
@ -82,6 +82,7 @@ _subset2 (hb_subset_plan_t *plan)
|
||||||
if (unlikely (!buf.alloc (buf_size)))
|
if (unlikely (!buf.alloc (buf_size)))
|
||||||
{
|
{
|
||||||
DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c failed to allocate %u bytes.", HB_UNTAG (tag), buf_size);
|
DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c failed to allocate %u bytes.", HB_UNTAG (tag), buf_size);
|
||||||
|
hb_blob_destroy (source_blob);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
retry:
|
retry:
|
||||||
|
@ -96,6 +97,7 @@ _subset2 (hb_subset_plan_t *plan)
|
||||||
if (unlikely (!buf.alloc (buf_size)))
|
if (unlikely (!buf.alloc (buf_size)))
|
||||||
{
|
{
|
||||||
DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.", HB_UNTAG (tag), buf_size);
|
DEBUG_MSG(SUBSET, nullptr, "OT::%c%c%c%c failed to reallocate %u bytes.", HB_UNTAG (tag), buf_size);
|
||||||
|
hb_blob_destroy (source_blob);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
goto retry;
|
goto retry;
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue