Revision 80fa3341

b/block/qcow2-cluster.c
70 70

  
71 71
    ret = qcow2_cache_flush(bs, s->refcount_block_cache);
72 72
    if (ret < 0) {
73
        return ret;
73
        goto fail;
74 74
    }
75 75

  
76 76
    BLKDBG_EVENT(bs->file, BLKDBG_L1_GROW_WRITE_TABLE);
b/block/qcow2-refcount.c
1086 1086
    ret = check_refcounts_l1(bs, res, refcount_table, nb_clusters,
1087 1087
                       s->l1_table_offset, s->l1_size, 1);
1088 1088
    if (ret < 0) {
1089
        return ret;
1089
        goto fail;
1090 1090
    }
1091 1091

  
1092 1092
    /* snapshots */
......
1095 1095
        ret = check_refcounts_l1(bs, res, refcount_table, nb_clusters,
1096 1096
            sn->l1_table_offset, sn->l1_size, 0);
1097 1097
        if (ret < 0) {
1098
            return ret;
1098
            goto fail;
1099 1099
        }
1100 1100
    }
1101 1101
    inc_refcounts(bs, res, refcount_table, nb_clusters,
......
1159 1159
        }
1160 1160
    }
1161 1161

  
1162
    ret = 0;
1163

  
1164
fail:
1162 1165
    qemu_free(refcount_table);
1163 1166

  
1164
    return 0;
1167
    return ret;
1165 1168
}
1166 1169

  

Also available in: Unified diff