* src/storage_driver.c: cleanup when creating a storage pool fails,

patch by Henrik Persson
Daniel
This commit is contained in:
Daniel Veillard 2009-06-22 10:15:57 +00:00
parent 144276aa1a
commit c57932c663
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Jun 22 12:14:48 CEST 2009 Daniel Veillard <veillard@redhat.com>
* 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 <veillard@redhat.com>
* qemud/qemud.c src/conf.c src/conf.h src/qemu_conf.c src/xen_unified.c

View File

@ -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;
}