]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemu: getAutoDumpPath() return value should be dumpfile not domname.
authorYan Fu <yafu@redhat.com>
Wed, 13 Jul 2016 04:39:29 +0000 (12:39 +0800)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 13 Jul 2016 05:05:21 +0000 (07:05 +0200)
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>
src/qemu/qemu_driver.c

index f8d9afe25e8d2af560fd1815ef990807f3fa5b02..cda85f65fc98efd848287cd50ff2a57583f088f7 100644 (file)
@@ -3869,7 +3869,8 @@ getAutoDumpPath(virQEMUDriverPtr driver,
                              timestr));
 
     virObjectUnref(cfg);
-    return domname;
+    VIR_FREE(domname);
+    return dumpfile;
 }
 
 static void