firmware-utils/hcsmakeimage: fix possible memory leak and resource leaks
authorAndrea Dalla Costa <andrea@dallacosta.me>
Sat, 11 Jan 2020 21:57:58 +0000 (22:57 +0100)
committerPetr Štetiar <ynezz@true.cz>
Wed, 8 Jul 2020 14:07:05 +0000 (16:07 +0200)
commitd64b20da21d796334840fe9614bb0cb572e22fda
tree0c48500751900a2b84e0ac2c7c8c20c2e45f1a3c
parent4a77a060ab6219f830390cd53c2817b621f39760
firmware-utils/hcsmakeimage: fix possible memory leak and resource leaks

Add missing calls to `free` for variable `filebuffer`.
Add missing calls to `fclose` for variables `fd` and `fd_out`.

Signed-off-by: Andrea Dalla Costa <andrea@dallacosta.me>
tools/firmware-utils/src/hcsmakeimage.c