When `sfnt->load_face` succeeds it has already loaded any (optional) cmap data. As a result, a subsequent call to `sfnt->load_cmap` will overwrite the cmap data pointer with a new copy of the data but not free the old, leading to a leak. This is a fix for "* src/cff/cffobjs.c (cff_face_init): Better handling of Type0 fonts.". This still allows the cmap to be missing but avoids the leak by only calling `sfnt->load_cmap` when there is no `head` table (the font data is not being loaded as OpenType/CFF). * src/cff/cffobjs.c (cff_face_init): Fix leak Fixes: #1306master
parent
3f3e3de34e
commit
59320b2d3c
1 changed files with 10 additions and 8 deletions
Loading…
Reference in new issue