for (i = 0; i < s->table_nelems; i++) {
uint64_t offset = table->offsets[i];
- if (!offset) {
+ if (qed_offset_is_unalloc_cluster(offset) ||
+ qed_offset_is_zero_cluster(offset)) {
continue;
}
unsigned int num_invalid_l2;
uint64_t offset = table->offsets[i];
- if (!offset) {
+ if (qed_offset_is_unalloc_cluster(offset)) {
continue;
}
};
int ret;
- check.used_clusters = qemu_mallocz(((check.nclusters + 31) / 32) *
+ check.used_clusters = g_malloc0(((check.nclusters + 31) / 32) *
sizeof(check.used_clusters[0]));
ret = qed_check_l1_table(&check, s->l1_table);
qed_check_for_leaks(&check);
}
- qemu_free(check.used_clusters);
+ g_free(check.used_clusters);
return ret;
}