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/linuxboot.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'firmware/linuxboot.c') diff --git a/firmware/linuxboot.c b/firmware/linuxboot.c index f9732f6ace..419044b5a9 100644 --- a/firmware/linuxboot.c +++ b/firmware/linuxboot.c @@ -221,8 +221,7 @@ int uimage_load(struct uimage_header* uh, size_t* out_size, ret = 0; err: - if(state_h > 0) - core_free(state_h); + core_free(state_h); if(out_h > 0) { if(ret == 0) ret = out_h; -- cgit v1.2.3