From: Ján Tomko Date: Fri, 12 Jul 2019 14:11:16 +0000 (+0200) Subject: storage: rbd: actually index the array when iterating over it X-Git-Tag: v5.6.0-rc1~250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b7c4048fa0559fd81d57b7f7d13b1dccd6a99b2;p=thirdparty%2Flibvirt.git storage: rbd: actually index the array when iterating over it https://bugzilla.redhat.com/show_bug.cgi?id=1729292 Fixes: 3aa190f2a43a632b542a6ba751a6c3ab4d51f1dd Signed-off-by: Ján Tomko Reviewed-by: Daniel P. Berrangé --- diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backend_rbd.c index d3056287df..1cb447c55a 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -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;