glocalfileoutputstream: Tidy up error handling
After the recent reworking of this code it was possible for g_close()
to be called on fd == -1
, which is invalid. It would have reported an
error, were errors not ignored. So it was harmless, but still best to
fix.
Simplify the error handling by combining both error labels and checking
the state of fd
dynamically.
Coverity CID: #1450834
Signed-off-by: Philip Withnall pwithnall@endlessos.org