From 12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sat, 15 Oct 2022 09:08:09 -0400 Subject: move buflib_free invalid handle check to the function allow buflib_free to check for invalid or already freed handles within the function -- remove all the invalid handle guards thru core_free Change-Id: Ibdcbc82760fc93b674c42283fca420d94907df8e --- firmware/font.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'firmware/font.c') diff --git a/firmware/font.c b/firmware/font.c index b8fa1c537f..724cb84d57 100644 --- a/firmware/font.c +++ b/firmware/font.c @@ -604,8 +604,7 @@ void font_unload(int font_id) glyph_cache_save(font_id); close(pf->fd); } - if (handle > 0) - core_free(handle); + core_free(handle); buflib_allocations[font_id] = -1; } -- cgit v1.2.3