]> git.ipfire.org Git - thirdparty/libvirt.git/commit
storage: Fix error path in storagePoolDefineXML v1.3.2-rc2
authorJohn Ferlan <jferlan@redhat.com>
Thu, 25 Feb 2016 20:47:56 +0000 (15:47 -0500)
committerJohn Ferlan <jferlan@redhat.com>
Fri, 26 Feb 2016 12:23:05 +0000 (07:23 -0500)
commitee67069c73cb91e3762cc63587d2a14d9a7253af
treee47a88a03e6663e9397bf7ecc2894f296c29f4b7
parentc53e4ae0c83d4e1962b63de413f229af77ff57cc
storage: Fix error path in storagePoolDefineXML

Found by inspection - after calling virStoragePoolObjAssignDef the
pool is part of the driver->pools.objs list and the failure path
for the virStoragePoolObjSaveDef will use virStoragePoolObjRemove
to remove the pool from the objs list which will unlock and free
the pool pointer (as pools->objs[i] during the loop). Since the call
doesn't clear the pool address from the callee, we need to set it
to NULL; otherwise, the virStoragePoolObjUnlock in the cleanup: code
will fail miserably.
src/storage/storage_driver.c