[libvirt] [PATCHv4 2/3] qemu: Set cpuset.cpus for domain process
Martin Kletzander
mkletzan at redhat.com
Thu Jul 18 13:19:43 UTC 2013
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
More information about the libvir-list
mailing list