mbox series

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

Message ID 20201011102136.622361-1-mlevitsk@redhat.com
Headers show
Series qcow2: don't leave partially initialized file on image creation | expand

Message

Maxim Levitsky Oct. 11, 2020, 10:21 a.m. UTC
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