mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu_hotplug: Need to call virUSBDeviceFree()
This commit is contained in:
parent
0ea43d177c
commit
75fabbdf3f
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* qemu_hotplug.h: QEMU device hotplug management
|
* qemu_hotplug.h: QEMU device hotplug management
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2012 Red Hat, Inc.
|
* Copyright (C) 2006-2013 Red Hat, Inc.
|
||||||
* Copyright (C) 2006 Daniel P. Berrange
|
* Copyright (C) 2006 Daniel P. Berrange
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
||||||
@ -1135,8 +1135,12 @@ int qemuDomainAttachHostUsbDevice(virQEMUDriverPtr driver,
|
|||||||
|
|
||||||
data.vm = vm;
|
data.vm = vm;
|
||||||
data.cgroup = cgroup;
|
data.cgroup = cgroup;
|
||||||
if (virUSBDeviceFileIterate(usb, qemuSetupHostUsbDeviceCgroup, &data) < 0)
|
if (virUSBDeviceFileIterate(usb, qemuSetupHostUsbDeviceCgroup,
|
||||||
|
&data) < 0) {
|
||||||
|
virUSBDeviceFree(usb);
|
||||||
goto error;
|
goto error;
|
||||||
|
}
|
||||||
|
virUSBDeviceFree(usb);
|
||||||
}
|
}
|
||||||
|
|
||||||
qemuDomainObjEnterMonitorWithDriver(driver, vm);
|
qemuDomainObjEnterMonitorWithDriver(driver, vm);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user