Errors in qcow2_write_snapshots should always go down the error path. If
this path is taken, the newly allocated snapshot table clusters are
abandoned and should thus be freed.

Furthermore, we should safeguard against a possible future increase of
QEMU's maximum snapshot name/ID length.

Max Reitz (3):
  qcow2: Always use error path on writing snapshots
  qcow2: Free allocated snapshot table on error
  qcow2: Assert against snapshot name/ID overflow

 block/qcow2-snapshot.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

-- 
1.8.3.1


Reply via email to