[libvirt] [PATCH 09/11] lxc: Need to call usbFreeDevice()
Osier Yang
jyang at redhat.com
Thu Jan 31 11:27:37 UTC 2013
On 2013年01月31日 03:36, John Ferlan wrote:
> ---
> 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:
ACK
More information about the libvir-list
mailing list