os/FileJournal.cc: fix potential use after close cases
Fix checks after _open() calls to make sure to use the
filehandle only if open returns '0'.
Fix for:
CID
1128395 (#1 of 1): Use after close (USE_AFTER_FREE)
pass_closed_arg: Passing closed handle this->fd as an argument
to pwrite.
CID
1128396 (#1 of 2): Use after close (USE_AFTER_FREE)
pass_closed_arg: Passing closed handle this->fd as an argument
to read_header.
CID
1128397 (#1 of 1): Use after close (USE_AFTER_FREE)
pass_closed_arg: Passing closed handle this->fd as an argument
to read_header.
CID
1128398 (#1 of 1): Use after close (USE_AFTER_FREE)
pass_closed_arg: Passing closed handle this->fd as an argument
to read_header.
CID
1128400 (#1 of 1): Use after close (USE_AFTER_FREE)
pass_closed_arg: Passing closed handle this->fd as an argument
to read_header.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>