mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 07:17:44 +00: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:
parent
b8a0103d45
commit
4140dbedd9
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user