From 8305322d244337b8af7d2464f88829b307cbb721 Mon Sep 17 00:00:00 2001 From: Yan Fu Date: Wed, 13 Jul 2016 12:39:29 +0800 Subject: [PATCH] qemu: getAutoDumpPath() return value should be dumpfile not domname. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1354238 So we spend some time and effort constructing perfect file name for an automatic coredump of a domain, but then just leak it and use the domain name anyway. This is probably due to a silly mistake that slipped even through review. Signed-off-by: Michal Privoznik --- src/qemu/qemu_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index f8d9afe25e..cda85f65fc 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3869,7 +3869,8 @@ getAutoDumpPath(virQEMUDriverPtr driver, timestr)); virObjectUnref(cfg); - return domname; + VIR_FREE(domname); + return dumpfile; } static void -- GitLab