[libvirt] [PATCH RFC 04/27] Revert "storage: fix omitted slash in gluster volume URI"

Peter Krempa pkrempa at redhat.com
Mon Dec 16 16:32:32 UTC 2013


The fix for the missing slash at the beginning of the volume URI prints
to a bad variable causing a memory leak and another one if the variable
will be fixed. Revert the commit instead as we can just add a slash to
the "key" attribute.

The fix also caused a regression, where the path of the volume didn't
include the actual volume name and thus was invalid.

This reverts commit 6cd60b687acd04ea1538690b7d80f2809e0e29d4.
---
 src/storage/storage_backend_gluster.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/storage/storage_backend_gluster.c b/src/storage/storage_backend_gluster.c
index 622526b..1be9034 100644
--- a/src/storage/storage_backend_gluster.c
+++ b/src/storage/storage_backend_gluster.c
@@ -227,10 +227,7 @@ virStorageBackendGlusterRefreshVol(virStorageBackendGlusterStatePtr state,
         goto cleanup;

     tmp = state->uri->path;
-    if (virAsprintf(&vol->key, "%s%s", state->uri->path, name) < 0) {
-        state->uri->path = tmp;
-        goto cleanup;
-    }
+    state->uri->path = vol->key;
     if (!(vol->target.path = virURIFormat(state->uri))) {
         state->uri->path = tmp;
         goto cleanup;
-- 
1.8.5.1




More information about the libvir-list mailing list