The qemuDomainLogContextNew method leaks the "logfile" path
on the non-virtlogd code path.
Signed-off-by: Daniel P. Berrange <berrange(a)redhat.com>
---
src/qemu/qemu_domain.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ed21245..4d6c595 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -2360,13 +2360,15 @@ qemuDomainLogContextPtr qemuDomainLogContextNew(virQEMUDriverPtr
driver,
}
}
+ cleanup:
virObjectUnref(cfg);
+ VIR_FREE(logfile);
return ctxt;
error:
- virObjectUnref(cfg);
qemuDomainLogContextFree(ctxt);
- return NULL;
+ ctxt = NULL;
+ goto cleanup;
}
--
2.5.0