ee67069 storage: Fix error path in storagePoolDefineXML

Authored and Committed by John Ferlan 8 years ago
    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.
    
        
file modified
+1 -0