svace: fix closing potentially negative fd 89/197989/1
authorKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 17 Jan 2019 11:38:48 +0000 (12:38 +0100)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 17 Jan 2019 11:38:48 +0000 (12:38 +0100)
commit11f80fbdbf633b1f396e87d87c08de757fdb1bd4
tree156faba422ba738662ad097a943d228ec1389c2f
parentd233538e2b50d3fe644a64096945ea35fe65495d
svace: fix closing potentially negative fd

This commit fixes following issue reported by svace:

 "Variable 'cinfo.prstatus_fd', which may receive negative value at
  crash-manager.c:588 by calling function 'set_crash_info' at
  crash-manager.c:1267, is used at crash-manager.c:1332 by calling
  function 'close'."

Change-Id: Ie625bc8ac5eb16a84bb7b139b569c6189e1a5e25
src/crash-manager/crash-manager.c