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 <mprivozn@redhat.com>
This commit is contained in:
Yan Fu 2016-07-13 12:39:29 +08:00 committed by Michal Privoznik
parent c8f08e4876
commit 8305322d24

View File

@ -3869,7 +3869,8 @@ getAutoDumpPath(virQEMUDriverPtr driver,
timestr));
virObjectUnref(cfg);
return domname;
VIR_FREE(domname);
return dumpfile;
}
static void