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/target/mips/ingenic_x1000/installer-x1000.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/target/mips/ingenic_x1000/installer-x1000.c')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/installer-x1000.c | 3 |
1 files changed, 1 insertions, 2 deletions
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) | |||
178 | if(u->tar && mtar_is_open(u->tar)) | 178 | if(u->tar && mtar_is_open(u->tar)) |
179 | mtar_close(u->tar); | 179 | mtar_close(u->tar); |
180 | 180 | ||
181 | if(u->buf_hnd >= 0) | 181 | core_free(u->buf_hnd); |
182 | core_free(u->buf_hnd); | ||
183 | 182 | ||
184 | if(u->ndrv) { | 183 | if(u->ndrv) { |
185 | nand_close(u->ndrv); | 184 | nand_close(u->ndrv); |