[libvirt] [PATCH 10/11] qemu_cgroup: Need to call usbFreeDevice()

John Ferlan jferlan at redhat.com
Wed Jan 30 19:36:35 UTC 2013


---
 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




More information about the libvir-list mailing list