* src/sfntfont.c (sfntfont_read_cmap):
(sfntfont_open): Fix leaks of file descriptors.
if (!font)
{
- close (fd);
+ emacs_close (fd);
return;
}
if (!table)
{
- close (fd);
+ emacs_close (fd);
return;
}
xfree (data);
xfree (subtables);
xfree (table);
+ emacs_close (fd);
}
/* Look up a character CHARACTER in the font description DESC. Cache
/* Calculate the xfld name. */
font->props[FONT_NAME_INDEX] = Ffont_xlfd_name (font_object, Qnil);
+ /* Close the font file descriptor. */
+ emacs_close (fd);
+
/* All done. */
unblock_input ();
return font_object;
bail2:
xfree (subtable);
bail1:
- close (fd);
+ emacs_close (fd);
bail:
unblock_input ();
return Qnil;