[PATCH 09/11] lxc: Need to call usbFreeDevice()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/lxc/lxc_cgroup.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/lxc/lxc_cgroup.c b/src/lxc/lxc_cgroup.c
index 1984c5f..ece9e03 100644
--- a/src/lxc/lxc_cgroup.c
+++ b/src/lxc/lxc_cgroup.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2012 Red Hat, Inc.
+ * Copyright (C) 2010-2013 Red Hat, Inc.
  * Copyright IBM Corp. 2008
  *
  * lxc_cgroup.c: LXC cgroup helpers
@@ -426,8 +426,10 @@ static int virLXCCgroupSetupDeviceACL(virDomainDefPtr def,
                                     NULL)) == NULL)
                 goto cleanup;
 
-            if (usbDeviceFileIterate(usb, virLXCSetupHostUsbDeviceCgroup,
-                                     cgroup) < 0)
+            rc = usbDeviceFileIterate(usb, virLXCSetupHostUsbDeviceCgroup,
+                                      cgroup);
+            usbFreeDevice(usb);
+            if (rc < 0)
                 goto cleanup;
             break;
         case VIR_DOMAIN_HOSTDEV_MODE_CAPABILITIES:
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]