[libvirt] [PATCH 1/1] Fix pool create when pool already exists.

David Allan dallan at redhat.com
Tue Jun 30 20:22:38 UTC 2009


* src/storage_driver.c: don't call virStoragePoolObjRemove when a pool create call fails because the pool already exists.
---
 src/storage_driver.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/storage_driver.c b/src/storage_driver.c
index 69dcbda..5a26993 100644
--- a/src/storage_driver.c
+++ b/src/storage_driver.c
@@ -476,6 +476,8 @@ storagePoolCreate(virConnectPtr conn,
     if (pool) {
         virStorageReportError(conn, VIR_ERR_INTERNAL_ERROR,
                               "%s", _("storage pool already exists"));
+        virStoragePoolObjUnlock(pool);
+        pool = NULL;
         goto cleanup;
     }
 
-- 
1.6.0.6




More information about the libvir-list mailing list