[PATCH v2 0/2] qcow2: don't leave partially initialized file on image creation

Maxim Levitsky posted 2 patches 3 years, 6 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20201011102136.622361-1-mlevitsk@redhat.com
Maintainers: Max Reitz <mreitz@redhat.com>, Kevin Wolf <kwolf@redhat.com>
There is a newer version of this series
block/crypto.c |  1 +
block/qcow2.c  | 12 ++++++++++++
2 files changed, 13 insertions(+)
[PATCH v2 0/2] qcow2: don't leave partially initialized file on image creation
Posted by Maxim Levitsky 3 years, 6 months ago
Use the bdrv_co_delete_file interface to delete the underlying
file if qcow2 initilization fails (e.g due to bad encryption secret)

This gives the qcow2 the same treatment as to luks.

V2: added a patch to fix a memory leak.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1845353

Maxim Levitsky (2):
  crypto: luks: fix tiny memory leak
  block: qcow2: remove the created file on initialization error

 block/crypto.c |  1 +
 block/qcow2.c  | 12 ++++++++++++
 2 files changed, 13 insertions(+)

-- 
2.26.2