qcow2: Fix snapshot restoration in snapshot_create
PATCH 1/1 qcow2: Fix snapshot restoration in snapshot_create
If the new snapshot table could not be written in qcow2_snapshot_create, the old snapshot table has to be restored in memory and the new one released. This should include restoration of the old snapshot count as well, which is added by this patch.
Signed-off-by Max Reitz <[email protected]>
--- block/qcow2-snapshot.c | 1 + 1 file changed, 1 insertion(+)
block/qcow2-snapshot.c +1 -0
@@ -433,6 +433,7 @@ int qcow2_snapshot_create(BlockDriverState *bs, QEMUSnapshotInfo *sn_info)if (ret <0 ) {g_free (s->snapshots); s->snapshots = old_snapshot_list; + s->nb_snapshots--; goto fail; }
Signature · 1 line
1.8.3.1
Kevin Wolf
AppliedAm 09.10.2013 um 14:42 hat Max Reitz geschrieben:
Quoted 6 lines
If the new snapshot table could not be written in
qcow2_snapshot_create, the old snapshot table has to be restored in memory and the new one released. This should include restoration of the old snapshot count as well, which is added by this patch.Signed-off-by Max Reitz <[email protected]>
Thanks, applied to the block branch.
Kevin