There is one string that can be VIR_AUTOFREE used on.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_cgroup.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index c23f0af2aa..689e0839cd 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -830,7 +830,7 @@ qemuSetupCpusetMems(virDomainObjPtr vm)
virCgroupPtr cgroup_temp = NULL;
qemuDomainObjPrivatePtr priv = vm->privateData;
virDomainNumatuneMemMode mode;
- char *mem_mask = NULL;
+ VIR_AUTOFREE(char *) mem_mask = NULL;
int ret = -1;
if (!virCgroupHasController(priv->cgroup, VIR_CGROUP_CONTROLLER_CPUSET))
@@ -843,7 +843,7 @@ qemuSetupCpusetMems(virDomainObjPtr vm)
if (virDomainNumatuneMaybeFormatNodeset(vm->def->numa,
priv->autoNodeset,
&mem_mask, -1) < 0)
- goto cleanup;
+ return -1;
if (mem_mask)
if (virCgroupNewThread(priv->cgroup, VIR_CGROUP_THREAD_EMULATOR, 0,
@@ -853,7 +853,6 @@ qemuSetupCpusetMems(virDomainObjPtr vm)
ret = 0;
cleanup:
- VIR_FREE(mem_mask);
virCgroupFree(&cgroup_temp);
return ret;
}
--
2.21.0