This patch uses VIR_AUTOFREE on instances of 'unsigned int *' and 'unsigned long long *' found in qemu_driver.c. Suggested-by: Erik Skultety <eskultet@xxxxxxxxxx> Signed-off-by: Daniel Henrique Barboza <danielhb413@xxxxxxxxx> --- src/qemu/qemu_driver.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index aac952363e..4940fb083b 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1077,7 +1077,7 @@ qemuStateStop(void) size_t i; int state; virDomainPtr *domains = NULL; - unsigned int *flags = NULL; + VIR_AUTOFREE(unsigned int *) flags = NULL; VIR_AUTOUNREF(virQEMUDriverConfigPtr) cfg = virQEMUDriverGetConfig(qemu_driver); if (!(conn = virConnectOpen(cfg->uri))) @@ -1115,7 +1115,6 @@ qemuStateStop(void) virObjectUnref(domains[i]); VIR_FREE(domains); } - VIR_FREE(flags); return ret; } @@ -20565,7 +20564,7 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, size_t i; int ret = -1; virVcpuInfoPtr cpuinfo = NULL; - unsigned long long *cpuwait = NULL; + VIR_AUTOFREE(unsigned long long *) cpuwait = NULL; if (virTypedParamListAddUInt(params, virDomainDefGetVcpus(dom->def), "vcpu.current") < 0) @@ -20630,7 +20629,6 @@ qemuDomainGetStatsVcpu(virQEMUDriverPtr driver, cleanup: VIR_FREE(cpuinfo); - VIR_FREE(cpuwait); return ret; } -- 2.21.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list