]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
storage: rbd: actually index the array when iterating over it
authorJán Tomko <jtomko@redhat.com>
Fri, 12 Jul 2019 14:11:16 +0000 (16:11 +0200)
committerJán Tomko <jtomko@redhat.com>
Fri, 12 Jul 2019 15:09:42 +0000 (17:09 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=1729292

Fixes: 3aa190f2a43a632b542a6ba751a6c3ab4d51f1dd
Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
src/storage/storage_backend_rbd.c

index d3056287dfbcb8fe2701850b446a5dc3dc8527f1..1cb447c55a05e8ef7a93b61c2e9f1e404998b208 100644 (file)
@@ -637,7 +637,7 @@ virStorageBackendRBDGetVolNames(virStorageBackendRBDStatePtr ptr)
     nnames = nimages;
 
     for (i = 0; i < nimages; i++)
-        VIR_STEAL_PTR(names[i], images->name);
+        VIR_STEAL_PTR(names[i], images[i]->name);
 
     return names;