virDomainDiskInsert: Don't access NULL disk target
virDomainDiskInsert: Don't access NULL disk target

'virDomainDiskInsert' orders the inserted disks by target. If the target
is not provided though it would try to parse it anyways. This lead to a
crash when parsing a definition where there are multiple disks and of
two disks sharing the bus at least one also misses the target.

Since we want to actually use the parser for stuff which doesn't
necessarily need the disk target, we make virDomainDiskInsert tolerant
of missing target instead. The definition will be rejected by the
validator regardless of the order the disks were inserted in.

Fixes: 61fd7174
Closes: https://gitlab.com/libvirt/libvirt/-/issues/257
Signed-off-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>
Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

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