Make qio_channel_file_close() set fd to -1 even if qemu_close() returns an error so that qio_channel_file_finalize() doesn't call close again. On Linux, close() always closes the fd, even when it returns an error. Because the fd can be reused after it is closed, the close must not be retried. Signed-off-by: Filip Hejsek <filip.hejsek@gmail.com> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>