virStorageBackendRBDGetVolNames: Fix memory leak in 'rbd_list2' version
virStorageBackendRBDGetVolNames: Fix memory leak in 'rbd_list2' version

The 'rbd_image_spec_t' struct has two string members 'id' and
'name'. We only stole the 'name' members thus the 'id's as well as the
whole list would be leaked on success.

Restructure the code so that we copy out the image names and call
rbd_image_spec_list_cleanup on success rather than on error.

The error path is then handled by using g_autofree for 'images'.

Since we no longer have a error path after allocating the returned
string list we can completely remove its cleanup.

Signed-off-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>
Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

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