[sbix] Fix memory leak in early return
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11210
This commit is contained in:
parent
edaa768253
commit
0af3d176a6
|
@ -244,7 +244,10 @@ struct sbix
|
||||||
hb_blob_t *blob = reference_png (font, glyph, &x_offset, &y_offset, &strike_ppem);
|
hb_blob_t *blob = reference_png (font, glyph, &x_offset, &y_offset, &strike_ppem);
|
||||||
|
|
||||||
if (unlikely (blob->length < sizeof (PNGHeader)))
|
if (unlikely (blob->length < sizeof (PNGHeader)))
|
||||||
|
{
|
||||||
|
hb_blob_destroy (blob);
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const PNGHeader &png = *blob->as<PNGHeader>();
|
const PNGHeader &png = *blob->as<PNGHeader>();
|
||||||
|
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue