diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-10-15 09:08:09 -0400 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2022-10-15 09:26:58 -0400 |
commit | 12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69 (patch) | |
tree | b4885951a5cba1b78c21b30ce37a1d6f1574aa5f /firmware/font.c | |
parent | 9d3d925295112a0080bc1d70fad170db9e1af2a9 (diff) | |
download | rockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.tar.gz rockbox-12ef045fdf5a9e2b4d5618cc3b7ba50ecc0ccf69.zip |
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
Diffstat (limited to 'firmware/font.c')
-rw-r--r-- | firmware/font.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) | |||
604 | glyph_cache_save(font_id); | 604 | glyph_cache_save(font_id); |
605 | close(pf->fd); | 605 | close(pf->fd); |
606 | } | 606 | } |
607 | if (handle > 0) | 607 | core_free(handle); |
608 | core_free(handle); | ||
609 | buflib_allocations[font_id] = -1; | 608 | buflib_allocations[font_id] = -1; |
610 | 609 | ||
611 | } | 610 | } |