summaryrefslogtreecommitdiff
path: root/block/qcow2.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2012-05-11 15:33:03 +0200
committerKevin Wolf <kwolf@redhat.com>2012-05-14 17:02:19 +0200
commitc44bfe4637424a8f1b411b72a465951f104c29ea (patch)
tree2a8055d3306606880953940b6bcec826bc81a484 /block/qcow2.c
parent99b5beba2f6c3f2e206e6200a05519a0ec2dc8db (diff)
downloadqemu-c44bfe4637424a8f1b411b72a465951f104c29ea.tar.gz
qemu-c44bfe4637424a8f1b411b72a465951f104c29ea.tar.bz2
qemu-c44bfe4637424a8f1b411b72a465951f104c29ea.zip
qcow2: Don't ignore failure to clear autoclear flags
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/qcow2.c')
-rw-r--r--block/qcow2.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 3bae2d837e..655799c6a0 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -300,7 +300,10 @@ static int qcow2_open(BlockDriverState *bs, int flags)
if (!bs->read_only && s->autoclear_features != 0) {
s->autoclear_features = 0;
- qcow2_update_header(bs);
+ ret = qcow2_update_header(bs);
+ if (ret < 0) {
+ goto fail;
+ }
}
/* Check support for various header values */