Commit a2565df1 authored by Ross Lagerwall's avatar Ross Lagerwall Committed by Daniel P. Berrangé
Browse files

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: default avatarRoss Lagerwall <ross.lagerwall@citrix.com>
Signed-off-by: default avatarDaniel P. Berrange <berrange@redhat.com>
parent 902f6e14
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -178,6 +178,7 @@ static int qio_channel_file_close(QIOChannel *ioc,
                         "Unable to close file");
        return -1;
    }
    fioc->fd = -1;
    return 0;
}