firmware-utils/mkfwimage: fix possible memory and resource leak
authorAndrea Dalla Costa <andrea@dallacosta.me>
Sat, 11 Jan 2020 22:27:17 +0000 (23:27 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 14 Jan 2020 16:48:50 +0000 (17:48 +0100)
commitf16c80d1a241b813706367627383f74248d4c213
tree8978bbb5d5f53d722e8af726b1b81343be1e44b9
parent6ed749b897127e8857822df958962c8ceeafc65a
firmware-utils/mkfwimage: fix possible memory and resource leak

Add missing calls to `free` for variable `mem`.
Add missing call to `fclose` for variable `f`.

The same changes were made in both `mkfwimage.c` and `mkfwimage2.c`.

Signed-off-by: Andrea Dalla Costa <andrea@dallacosta.me>
src/mkfwimage.c
src/mkfwimage2.c