virDomainNumaFillCPUsInNode: Skip over NUMA nodes without vCPUs
virDomainNumaFillCPUsInNode: Skip over NUMA nodes without vCPUs

After v6.5.0-rc1~148 we started to rectify vCPU to guest NUMA
assignment - if there is a vCPU not assigned to any guest NUMA
node it is automatically assigned to node #0.

A month later I've made it possible to define guest NUMA nodes
without vCPUs (v6.6.0-rc1~250) - this is needed because of HMAT.
As a part of that I fixed all callers of
virDomainNumaGetNodeCpumask() (which returns a bitmap of vCPUs for
given node) to handle case when NULL is returned (i.e. no vCPUs
assigned to given node). But of course my patch was written
before aforementioned vCPU rectify patch but merged afterwards
and hence I missed the virDomainNumaFillCPUsInNode() caller.

And because we are dealing with a NULL pointer, of course this
leads to a crash. Just try to define a domain with at least two
NUMA nodes and no vCPU assignment to any of the nodes.

Fixes: a26f61ee0cffa421b87ef568002b684dd8025432
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1880289
Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Daniel Henrique Barboza <627b089ad62deae9aaf06ccfa2c9056df28927e0@gmail.com>

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