aboutsummaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/qcow2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block/qcow2.c b/block/qcow2.c
index 655799c6a0..c2e49cded3 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -919,7 +919,8 @@ int qcow2_update_header(BlockDriverState *bs)
ret = sizeof(*header);
break;
default:
- return -EINVAL;
+ ret = -EINVAL;
+ goto fail;
}
buf += ret;