From: Yan Fu Date: Wed, 13 Jul 2016 04:39:29 +0000 (+0800) Subject: qemu: getAutoDumpPath() return value should be dumpfile not domname. X-Git-Tag: v2.1.0-rc1~159 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8305322d244337b8af7d2464f88829b307cbb721;p=thirdparty%2Flibvirt.git 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 --- 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