From 9b7c4048fa0559fd81d57b7f7d13b1dccd6a99b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Fri, 12 Jul 2019 16:11:16 +0200 Subject: [PATCH] storage: rbd: actually index the array when iterating over it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://bugzilla.redhat.com/show_bug.cgi?id=1729292 Fixes: 3aa190f2a43a632b542a6ba751a6c3ab4d51f1dd Signed-off-by: Ján Tomko Reviewed-by: Daniel P. Berrangé --- src/storage/storage_backend_rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;