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