If the detected qemu version is below our required version 'package' would be leaked. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4c52dfc714..e3db7ce71c 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -4322,7 +4322,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, { int ret = -1; int major, minor, micro; - char *package = NULL; + VIR_AUTOFREE(char *) package = NULL; /* @mon is supposed to be locked by callee */ @@ -4347,7 +4347,7 @@ virQEMUCapsInitQMPMonitor(virQEMUCapsPtr qemuCaps, } qemuCaps->version = major * 1000000 + minor * 1000 + micro; - qemuCaps->package = package; + VIR_STEAL_PTR(qemuCaps->package, package); qemuCaps->usedQMP = true; if (virQEMUCapsInitQMPArch(qemuCaps, mon) < 0) -- 2.20.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list