diff options
Diffstat (limited to 'libskrift_close_font.c')
-rw-r--r-- | libskrift_close_font.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libskrift_close_font.c b/libskrift_close_font.c new file mode 100644 index 0000000..2786666 --- /dev/null +++ b/libskrift_close_font.c @@ -0,0 +1,14 @@ +/* See LICENSE file for copyright and license details. */ +#include "common.h" + +void +libskrift_close_font(LIBSKRIFT_FONT *font) +{ + if (font && !--font->refcount) { + sft_freefont(font->font); + free(font->memory_free); + if (font->memory_unmap) + munmap(font->memory_unmap, font->memory_size); + free(font); + } +} |