From c57932c663bc4a0e63865e35285926c9f4e9f391 Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Mon, 22 Jun 2009 10:15:57 +0000 Subject: [PATCH] * src/storage_driver.c: cleanup when creating a storage pool fails, patch by Henrik Persson Daniel --- ChangeLog | 5 +++++ src/storage_driver.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1425fc38b5..f959dca9f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jun 22 12:14:48 CEST 2009 Daniel Veillard + + * src/storage_driver.c: cleanup when creating a storage pool fails, + patch by Henrik Persson + Fri Jun 19 14:32:41 CEST 2009 Daniel Veillard * qemud/qemud.c src/conf.c src/conf.h src/qemu_conf.c src/xen_unified.c diff --git a/src/storage_driver.c b/src/storage_driver.c index 71e64a445d..4a6e5e24e5 100644 --- a/src/storage_driver.c +++ b/src/storage_driver.c @@ -498,11 +498,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; } -- GitLab