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)
commit77806ad75a01458eb7ee4fcd0178b7f1600830fd
treee60201e7fdf80790259c870616565f0899ebd308
parentd3677bbf7e67396a005b2e9d1bf2262d49c5294a
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>
src/dns313-header.c