util: Fix for NULL dereference
The device xml parser code does not set "model" while parsing the following XML: <interface type='hostdev'> <source> <address type='pci' domain='0x0002' bus='0x01' slot='0x00' function='0x2'/> </source> </interface> The net->model can be NULL and therefore must be compared using STREQ_NULLABLE instead of plain STREQ. Fixes: ac47e4a6 (qemu: replace "def->nets[i]" with "net" and "def->sounds[i]" with "sound") Fixes: c7fc151e (qemu: assign virtio devices to PCIe slot when appropriate) Signed-off-by: NRadoslaw Biernacki <radoslaw.biernacki@linaro.org> Signed-off-by: Ndann frazier <dann.frazier@canonical.com> Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
Showing
想要评论请 注册 或 登录