summaryrefslogtreecommitdiffstats
path: root/firmware/font.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/font.c')
-rw-r--r--firmware/font.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/font.c b/firmware/font.c
index 77cf66c737..7dbc5a258a 100644
--- a/firmware/font.c
+++ b/firmware/font.c
@@ -348,12 +348,16 @@ static bool internal_load_font(struct font* pf, const char *path,
if (!font_load_header(pf))
{
DEBUGF("Failed font header load");
+ close(pf->fd);
+ pf->fd = -1;
return false;
}
if (!font_load_cached(pf))
{
DEBUGF("Failed font cache load");
+ close(pf->fd);
+ pf->fd = -1;
return false;
}