Skip to content

Commit

Permalink
blkverify: Fix BDS leak in .bdrv_open error path
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
  • Loading branch information
kevmw committed Oct 16, 2015
1 parent 779020c commit 7e39d3a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions block/blkverify.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 7e39d3a

Please sign in to comment.