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/target/mips/ingenic_x1000/installer-x1000.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'firmware/target') diff --git a/firmware/target/mips/ingenic_x1000/installer-x1000.c b/firmware/target/mips/ingenic_x1000/installer-x1000.c index 48850f8a62..ef5bbcd66a 100644 --- a/firmware/target/mips/ingenic_x1000/installer-x1000.c +++ b/firmware/target/mips/ingenic_x1000/installer-x1000.c @@ -178,8 +178,7 @@ static void updater_cleanup(struct updater* u) if(u->tar && mtar_is_open(u->tar)) mtar_close(u->tar); - if(u->buf_hnd >= 0) - core_free(u->buf_hnd); + core_free(u->buf_hnd); if(u->ndrv) { nand_close(u->ndrv); -- cgit v1.2.3