mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
storage: Fix the use-after-free memory bug
Introduced by commit e0139e3044. virStorageVolDefFree free'ed the
pointers that are still used by the added volume object, this changes
it back to VIR_FREE.
This commit is contained in:
@@ -1618,7 +1618,7 @@ storageVolCreateXML(virStoragePoolPtr obj,
|
|||||||
cleanup:
|
cleanup:
|
||||||
virObjectUnref(volobj);
|
virObjectUnref(volobj);
|
||||||
virStorageVolDefFree(voldef);
|
virStorageVolDefFree(voldef);
|
||||||
virStorageVolDefFree(buildvoldef);
|
VIR_FREE(buildvoldef);
|
||||||
if (pool)
|
if (pool)
|
||||||
virStoragePoolObjUnlock(pool);
|
virStoragePoolObjUnlock(pool);
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user