Message ID | 1411373477-16938-8-git-send-email-mjt@msgid.tls.msk.ru |
---|---|
State | New |
Headers | show |
diff --git a/block/vhdx.c b/block/vhdx.c index 796b7bd..5bf292e 100644 --- a/block/vhdx.c +++ b/block/vhdx.c @@ -1593,7 +1593,7 @@ static int vhdx_create_bat(BlockDriverState *bs, BDRVVHDXState *s, bdrv_has_zero_init(bs) == 0) { /* for a fixed file, the default BAT entry is not zero */ s->bat = g_try_malloc0(length); - if (length && s->bat != NULL) { + if (length && s->bat == NULL) { ret = -ENOMEM; goto exit; }