[libvirt] [PATCH] storage: rbd: do not attempt to dereference a non-pointer

Ján Tomko posted 1 patch 4 years, 9 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/b632e00ffbfee7b11074bf4ca5f4399e929bbe53.1562946727.git.jtomko@redhat.com
src/storage/storage_backend_rbd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt] [PATCH] storage: rbd: do not attempt to dereference a non-pointer
Posted by Ján Tomko 4 years, 9 months ago
My commit 9b7c4048fa0559fd81d57b7f7d13b1dccd6a99b2 was too blind
and my librbd was not new enough to actually compile this part.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
Pushed under the 'build breaker fix' rule whilst violating the
'do not push patches on a Friday afternoon' rule.

 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 1cb447c55a..f3104ba310 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[i]->name);
+        VIR_STEAL_PTR(names[i], images[i].name);
 
     return names;
 
-- 
2.20.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list