diff options
author | Ross Lagerwall <ross.lagerwall@citrix.com> | 2017-11-01 14:25:25 +0000 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2018-02-15 16:54:57 +0000 |
commit | a2565df12c59362c061084a0c853dace410cac26 (patch) | |
tree | 671ec6dad0f4da0448ff597685887e1d81434055 /io | |
parent | 902f6e14fc68743ce24efb7d87dc3f8464a78bf3 (diff) | |
download | qemu-a2565df12c59362c061084a0c853dace410cac26.zip qemu-a2565df12c59362c061084a0c853dace410cac26.tar.gz qemu-a2565df12c59362c061084a0c853dace410cac26.tar.bz2 |
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>
Diffstat (limited to 'io')
-rw-r--r-- | io/channel-file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/io/channel-file.c b/io/channel-file.c index 16bf7ed..1f2f710 100644 --- a/io/channel-file.c +++ b/io/channel-file.c @@ -178,6 +178,7 @@ static int qio_channel_file_close(QIOChannel *ioc, "Unable to close file"); return -1; } + fioc->fd = -1; return 0; } |