Re: [PATCHv4 2/3] qemu: Set cpuset.cpus for domain process

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

 



On 07/18/2013 02:57 PM, Peter Krempa wrote:
> On 07/18/13 14:39, Martin Kletzander wrote:
[...]
>> ACK with these two nits fixed.
> 
> I noticed that the last hunk of the patch would actually leak the caps
> in case of cgroups fail. I will be pushing this with the following patch
> squashed in:
> 
> 
> diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
> index 9d2f757..4bebd31 100644
> --- a/src/qemu/qemu_cgroup.c
> +++ b/src/qemu/qemu_cgroup.c
> @@ -836,15 +836,15 @@ int qemuSetupCgroup(virQEMUDriverPtr driver,
>      virCapsPtr caps = NULL;
>      int ret = -1;
> 
> -    if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
> -        goto cleanup;
> -
>      if (qemuInitCgroup(driver, vm, true) < 0)
>          return -1;
> 
>      if (!priv->cgroup)
>          return 0;
> 
> +    if (!(caps = virQEMUDriverGetCapabilities(driver, false)))
> +        goto cleanup;
> +
>      if (qemuSetupDevicesCgroup(driver, vm) < 0)
>          goto cleanup;
> 
> 

Oh, you're right, I missed the fact that there were returns instead of
gotos, but this squashed in is ok, no returns after that.

Martin

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