]> xenbits.xensource.com Git - qemu-xen-4.3-testing.git/commitdiff
qcow2: Make sure to return an error when L2 table loading fails
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 14 Aug 2008 18:11:00 +0000 (18:11 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Thu, 14 Aug 2008 18:11:00 +0000 (18:11 +0000)
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

block-qcow2.c

index 736915cffeb86ec73714f6892e59df7863cb5b8c..fa664a74c9b9500a56e177ca4fe724c0d4d69995 100644 (file)
@@ -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 */