diff options
-rw-r--r-- | block/blkverify.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/block/blkverify.c b/block/blkverify.c index f8655add63..c5f8e8dcba 100644 --- a/block/blkverify.c +++ b/block/blkverify.c @@ -143,6 +143,9 @@ static int blkverify_open(BlockDriverState *bs, QDict *options, int flags, ret = 0; fail: + if (ret < 0) { + bdrv_unref_child(bs, bs->file); + } qemu_opts_del(opts); return ret; } |