[PATCH] add missing qemudReportError

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

 



Hi,
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.
Cheers,
 -- Guido

diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index 6dc08e0..48ccc60 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -1193,6 +1193,7 @@ static struct qemud_vm_def *qemudParseXML(virConnectPtr conn,
             } else if (!strcmp((char *)prop, "network")) {
                 def->os.bootDevs[def->os.nBootDevs++] = QEMUD_BOOT_NET;
             } else {
+                qemudReportError(conn, NULL, NULL, VIR_ERR_INTERNAL_ERROR, "unknown boot dev \'%s\'", (char*)prop);
                 goto error;
             }
             xmlFree(prop);

--
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]