Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 1d34bd5ae937157c68c1d2a605bb0b67 > files > 30

libvirt-0.6.3-20.1.el5_4.src.rpm

From 024f8c7d096623255f0e3b552725a8902db805a5 Mon Sep 17 00:00:00 2001
From: David Allan <dallan@redhat.com>
Date: Tue, 30 Jun 2009 11:56:06 -0400
Subject: [PATCH 1/1] 496616 fix

This patch contains both the upstream fix for this problem and the fix to the upstream fix.
---
 src/storage_driver.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/src/storage_driver.c b/src/storage_driver.c
index 71e64a4..26f8f27 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;
     }
 
@@ -498,11 +500,13 @@ storagePoolCreate(virConnectPtr conn,
     pool->active = 1;
 
     ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid);
+    virStoragePoolObjUnlock(pool);
+    pool = NULL;
 
 cleanup:
     virStoragePoolDefFree(def);
     if (pool)
-        virStoragePoolObjUnlock(pool);
+        virStoragePoolObjRemove(&driver->pools, pool);
     storageDriverUnlock(driver);
     return ret;
 }
-- 
1.6.0.6