qemu_conf: Avoid dereferencing NULL in virQEMUDriverGetHost{NUMACaps,CPU}
qemu_conf: Avoid dereferencing NULL in virQEMUDriverGetHost{NUMACaps,CPU}

When fixing [1] I've ran attached reproducer and had it spawn
1024 threads and query capabilities XML in each one of them. This
lead libvirtd to hit the RLIMIT_NOFILE limit which was kind of
expected. What wasn't expected was a subsequent segfault. It
happened because virCPUProbeHost failed and returned NULL. We've
taken the NULL and passed it to virCapabilitiesHostNUMARef()
which dereferenced it. Code inspection showed the same flas in
virQEMUDriverGetHostNUMACaps(), so I'm fixing both places.

1: https://bugzilla.redhat.com/show_bug.cgi?id=1791790

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>

jardasgit/libvirt,libvirt/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,zippy2/libvirt,fabianfreyer/libvirt,crobinso/libvirt,jfehlig/libvirt,jardasgit/libvirt,nertpinx/libvirt,crobinso/libvirt,nertpinx/libvirt,zippy2/libvirt,olafhering/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,libvirt/libvirt,olafhering/libvirt,libvirt/libvirt,nertpinx/libvirt,jardasgit/libvirt,zippy2/libvirt,crobinso/libvirt,olafhering/libvirt,zippy2/libvirt,jardasgit/libvirt,libvirt/libvirt,jfehlig/libvirt,crobinso/libvirt,jfehlig/libvirt,nertpinx/libvirt,olafhering/libvirt