virLockSpaceNewPostExecRestart: Fix out-of-bounds array access
virLockSpaceNewPostExecRestart: Fix out-of-bounds array access

'res->owners' is allocated to 'res->nOwners' elements, but unfortunately
'res->nOwners' doesn't contain the proper value until after the
allocation so 0 elements are allocated. The following loop which assumes
that the array has the right number of elements then accesses the
pointer out of bounds. The bug was also faithfully converted from
VIR_ALLOC_N to g_new0.

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

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