Skip to content

Commit c93142f

Browse files
authored
Merge pull request #7923 from Carreau/free-all-the-fonts
Fix leak of filedescriptor if fontsize cannot be set.
2 parents 60cd171 + 79218df commit c93142f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/ft2font.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,7 @@ FT2Font::FT2Font(FT_Open_Args &open_args, long hinting_factor_) : image(), face(
508508

509509
error = FT_Set_Char_Size(face, 12 * 64, 0, 72 * (unsigned int)hinting_factor, 72);
510510
if (error) {
511+
FT_Done_Face(face);
511512
throw "Could not set the fontsize";
512513
}
513514

0 commit comments

Comments
 (0)