[libvirt] [PATCH] Fix segfault if no qemu emulator passed

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

 



There is unfortunately a pretty prevalent
segfault in the latest libvirt. If a qemu
domain is defined without an emulator
specified, libvirtd crashes.

This is doubly unfortunate since current
virtinst generates an emulator-less config
for all qemu and kvm guests (I'm about to fix
this upstream though).

Attached patch fixes this.

Thanks,
Cole
diff --git a/src/qemu_conf.c b/src/qemu_conf.c
index d742c32..23ef050 100644
--- a/src/qemu_conf.c
+++ b/src/qemu_conf.c
@@ -790,7 +790,7 @@ int qemudBuildCommandLine(virConnectPtr conn,
     if (!emulator)
         return -1;
 
-    ADD_ARG_LIT(vm->def->emulator);
+    ADD_ARG_LIT(emulator);
     ADD_ARG_LIT("-S");
     ADD_ARG_LIT("-M");
     ADD_ARG_LIT(vm->def->os.machine);
--
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]