From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zlynk-0006OU-LW for qemu-devel@nongnu.org; Tue, 13 Oct 2015 08:35:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zlyni-0003lW-0e for qemu-devel@nongnu.org; Tue, 13 Oct 2015 08:35:32 -0400 Date: Tue, 13 Oct 2015 08:35:20 -0400 From: Jeff Cody Message-ID: <20151013123520.GA13672@localhost.localdomain> References: <1444738660-18285-1-git-send-email-kwolf@redhat.com> <1444738660-18285-3-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1444738660-18285-3-git-send-email-kwolf@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/2] blkverify: Fix BDS leak in .bdrv_open error path List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org On Tue, Oct 13, 2015 at 02:17:40PM +0200, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/blkverify.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/block/blkverify.c b/block/blkverify.c > index f8655ad..c5f8e8d 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; > } > -- > 1.8.3.1 > Reviewed-by: Jeff Cody