summaryrefslogtreecommitdiff
path: root/block-qcow2.c
diff options
context:
space:
mode:
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-14 18:11:00 +0000
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>2008-08-14 18:11:00 +0000
commit768706a52fae029eeabd338d64fcf3d41d2ac6ff (patch)
treebcdd8899c44839b0453b9600c17972c6567348f7 /block-qcow2.c
parent095a9c58ce12afeeb90c225ed087017c307bc0fd (diff)
downloadqemu-768706a52fae029eeabd338d64fcf3d41d2ac6ff.zip
qcow2: Make sure to return an error when L2 table loading fails
This was suggested by Kevin Wolf since this is, in fact, an error condition. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5007 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block-qcow2.c')
-rw-r--r--block-qcow2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block-qcow2.c b/block-qcow2.c
index 736915cffe..fa664a74c9 100644
--- a/block-qcow2.c
+++ b/block-qcow2.c
@@ -669,7 +669,7 @@ static uint64_t get_cluster_offset(BlockDriverState *bs,
l2_offset &= ~QCOW_OFLAG_COPIED;
l2_table = l2_load(bs, l2_offset);
if (l2_table == NULL)
- goto out;
+ return 0;
/* find the cluster offset for the given disk offset */