]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemuDomainDefPostParse: Fail if unable to fill machine type
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 16 Apr 2020 12:18:28 +0000 (14:18 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 16 Apr 2020 14:14:05 +0000 (16:14 +0200)
commit67b973b510ad68da06e8eb744d97b3e1df5fbcbe
tree9bd1771c52c214c6f82ab042d6e9377f237fcedd
parent67e19fc99a9405392d442b0d87627d9936c80dc1
qemuDomainDefPostParse: Fail if unable to fill machine type

Previously, we used virCapabilitiesDomainDataLookup() to fill
machine type in post parse callback if none was provided in the
domain XML. If machine type couldn't be filled in an error was
reported. After 4a4132b4625 we've changed it to
virQEMUCapsGetPreferredMachine() which returns NULL, but we no
longer report an error and proceed with the post parse callbacks
processing. This may lead to a crash because the code later on
assumes def->os.machine is not NULL.

Fixes: 4a4132b4625
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Mores <pmores@redhat.com>
src/qemu/qemu_domain.c