]> git.baikalelectronics.ru Git - uboot.git/commit
tools: kwbimage: Fix unchecked return value and fd leak
authorMario Six <mario.six@gdsys.cc>
Mon, 13 Feb 2017 09:11:55 +0000 (10:11 +0100)
committerStefan Roese <sr@denx.de>
Fri, 17 Feb 2017 09:15:21 +0000 (10:15 +0100)
commit33dc8ce361fc59e860f277883e249a5b83e3400a
tree83434198dbe2e6fd653c5f1e432669091ffa7561
parent6c81f4aa6ec94671a52f5e178527cf729e0dd092
tools: kwbimage: Fix unchecked return value and fd leak

The return value of fstat was not checked in kwbimage, and in the case
of an error, the already open file was not closed. Fix both errors.

Reported-by: Coverity (CID: 155971)
Reported-by: Coverity (CID: 155969)
Signed-off-by: Mario Six <mario.six@gdsys.cc>
Signed-off-by: Stefan Roese <sr@denx.de>
tools/kwbimage.c