firmware-utils/dgfirmare: fix possible resource leak
authorAndrea Dalla Costa <andrea@dallacosta.me>
Sat, 11 Jan 2020 21:27:39 +0000 (22:27 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 14 Jan 2020 16:48:50 +0000 (17:48 +0100)
commitd3677bbf7e67396a005b2e9d1bf2262d49c5294a
tree4202d7944bfc5f4baf229750bb52d8bcb779446a
parentf779effaa6db5a1baa021cbacd7cda89d5483665
firmware-utils/dgfirmare: fix possible resource leak

Add missing calls to `fclose` in functions `write_img`, `write_rootfs`
and `write_kernel`.
The not-closed files could lead to resource leaks.

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