mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 03:59:52 +00:00
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: 238e917285
("vfio/ccw/pci: Allow devices to opt-in for ballooning")
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
parent
a1c0f88649
commit
8709b3954d
@ -1432,6 +1432,7 @@ int vfio_get_device(VFIOGroup *group, const char *name,
|
|||||||
if (!QLIST_EMPTY(&group->device_list)) {
|
if (!QLIST_EMPTY(&group->device_list)) {
|
||||||
error_setg(errp,
|
error_setg(errp,
|
||||||
"Inconsistent device balloon setting within group");
|
"Inconsistent device balloon setting within group");
|
||||||
|
close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user