mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
storage: Clean up error path for create buildPool failure
Commit id 'aeb1078ab' added a buildPool option and failure path which calls virStoragePoolObjRemove, which unlocks the pool, clears the 'pool' variable, and goto cleanup. However, at cleanup virStoragePoolObjUnlock is called without check if pool is non NULL.
This commit is contained in:
parent
488222800e
commit
dc77344a8e
@ -930,7 +930,8 @@ storagePoolCreate(virStoragePoolPtr obj,
|
|||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(stateFile);
|
VIR_FREE(stateFile);
|
||||||
virStoragePoolObjUnlock(pool);
|
if (pool)
|
||||||
|
virStoragePoolObjUnlock(pool);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user