Commit 8709b395 authored by Alex Williamson's avatar Alex Williamson
Browse files

vfio/pci: Fix failure to close file descriptor on error



A new error path fails to close the device file descriptor when
triggered by a ballooning incompatibility within the group.  Fix it.

Fixes: 238e9172 ("vfio/ccw/pci: Allow devices to opt-in for ballooning")
Reviewed-by: default avatarPeter Xu <peterx@redhat.com>
Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
parent a1c0f886
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1432,6 +1432,7 @@ int vfio_get_device(VFIOGroup *group, const char *name,
        if (!QLIST_EMPTY(&group->device_list)) {
            error_setg(errp,
                       "Inconsistent device balloon setting within group");
            close(fd);
            return -1;
        }