---
src/qemu/qemu_cgroup.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 6527146..9f0eaf9 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -294,8 +294,10 @@ int qemuSetupCgroup(virQEMUDriverPtr driver,
NULL)) == NULL)
goto cleanup;
- if (usbDeviceFileIterate(usb, qemuSetupHostUsbDeviceCgroup,
- &data) < 0)
+ rc = usbDeviceFileIterate(usb, qemuSetupHostUsbDeviceCgroup,
+ &data);
+ usbFreeDevice(usb);
+ if (rc < 0)
goto cleanup;
}
}
--
1.7.11.7