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)
commit402b362db447c8163b4069537753b1ede3533d18
tree451c896decda3df78064fd124e2c44732ddab6d0
parent22b07ff73e0b3429b36f75694a082a68a4fdb013
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>
tools/firmware-utils/src/dgfirmware.c