]> xenbits.xensource.com Git - qemu-xen.git/commit
qcow2: Free only newly allocated clusters on error
authorMax Reitz <mreitz@redhat.com>
Fri, 27 Sep 2013 08:21:48 +0000 (10:21 +0200)
committerKevin Wolf <kwolf@redhat.com>
Fri, 27 Sep 2013 15:22:43 +0000 (17:22 +0200)
commit320c70666687db4dd4df8165f9fe6960de782ca9
tree2e992ef44883af06a0c9ad5da19864cc3a09c9bc
parentbe0b742ee320d1139d57062fa18490e7aa485f2a
qcow2: Free only newly allocated clusters on error

In expand_zero_clusters_in_l1, a new cluster is only allocated if it was
not already preallocated. On error, such preallocated clusters should
not be freed, but only the newly allocated ones.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c