提交 4140dbed 编写于 作者: O Osier Yang

storage: Fix the use-after-free memory bug

Introduced by commit e0139e30. virStorageVolDefFree free'ed the
pointers that are still used by the added volume object, this changes
it back to VIR_FREE.
上级 b8a0103d
......@@ -1618,7 +1618,7 @@ storageVolCreateXML(virStoragePoolPtr obj,
cleanup:
virObjectUnref(volobj);
virStorageVolDefFree(voldef);
virStorageVolDefFree(buildvoldef);
VIR_FREE(buildvoldef);
if (pool)
virStoragePoolObjUnlock(pool);
return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册