]> git.baikalelectronics.ru Git - uboot.git/commit
tools/fit_image.c: Update some return code paths
authorTom Rini <trini@konsulko.com>
Wed, 27 Sep 2017 02:14:44 +0000 (22:14 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2017 15:28:22 +0000 (11:28 -0400)
commitf0dc0b638a00107bba24ecbe31b573fd7267aacf
tree6a863bfe581b8c9d0b970b992b3499c697db0adf
parent5c8ab6fee164dd08b4ffd5663f50b92d7326e87f
tools/fit_image.c: Update some return code paths

Coverity has found some problems with the return paths in parts of this
code.  We have a case where we were going to the wrong part of the
unwind (open() failed so we cannot close the fd), a case where we were
only free()ing our buf on the error path and finally a case where we did
not munmap in the failure path.

Reported-by: Coverity (CID: 138492, 138495, 143064)
Signed-off-by: Tom Rini <trini@konsulko.com>
tools/fit_image.c