firmware-utils: fix possible memory leak and resource leak
authorAndrea Dalla Costa <andrea@dallacosta.me>
Sat, 11 Jan 2020 21:41:31 +0000 (22:41 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 14 Jan 2020 16:48:50 +0000 (17:48 +0100)
commit0ae0f48cec08e4698e678f5e145533209491e855
tree6f06794e3dcadf3b13b6d6eff38946939167fe8e
parent402b362db447c8163b4069537753b1ede3533d18
firmware-utils: fix possible memory leak and resource leak

Add missing calls to `free` for variable `buffer`.
This could lead to a memory leak.

Add missing call to `close` for file pointer `fdin`.
This could lead to a resource leak.

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