Re: [PATCH] add missing qemudReportError

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 05, 2008 at 01:06:14PM +0100, Guido Guenther wrote:
> without this qemudParseVMDef might return NULL when the boot dev
> configuration is invalid but virGetLastError returns NULL either since
> no error has been set, this leads to a segfault in qemudLoadConfig when
> trying to print the error message.
That said it might also be worthwhile to not let libvirtd segfault
because of a missing call to qemudReportError - this is debatable
though:
 -- Guido

diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 48ccc60..bed5bf7 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -2524,7 +2525,7 @@ qemudLoadConfig(struct qemud_driver *driver,
     if (!(def = qemudParseVMDef(NULL, driver, xml, file))) {
         virErrorPtr err = virGetLastError();
         qemudLog(QEMUD_WARN, "Error parsing QEMU guest config '%s' : %s",
-                 path, err->message);
+                 path, err ? err->message : "BUG: unknown error -
please report\n");
         return NULL;
     }
 

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]