diff options
Diffstat (limited to 'block/vpc.c')
-rw-r--r-- | block/vpc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/block/vpc.c b/block/vpc.c index 96903441b8..055efc42d2 100644 --- a/block/vpc.c +++ b/block/vpc.c @@ -269,7 +269,11 @@ static int vpc_open(BlockDriverState *bs, QDict *options, int flags, goto fail; } - s->pagetable = qemu_blockalign(bs, s->max_table_entries * 4); + s->pagetable = qemu_try_blockalign(bs->file, s->max_table_entries * 4); + if (s->pagetable == NULL) { + ret = -ENOMEM; + goto fail; + } s->bat_offset = be64_to_cpu(dyndisk_header->table_offset); |