io: Don't call close multiple times in QIOChannelFile
If the file descriptor underlying QIOChannelFile is closed in the io_close() method, don't close it again in the finalize() method since the file descriptor number may have been reused in the meantime. Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
902f6e14fc
commit
a2565df12c
@ -178,6 +178,7 @@ static int qio_channel_file_close(QIOChannel *ioc,
|
||||
"Unable to close file");
|
||||
return -1;
|
||||
}
|
||||
fioc->fd = -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user