From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, jcody@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] blkverify: Fix BDS leak in .bdrv_open error path
Date: Tue, 13 Oct 2015 14:17:40 +0200 [thread overview]
Message-ID: <1444738660-18285-3-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1444738660-18285-1-git-send-email-kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
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
next prev parent reply other threads:[~2015-10-13 12:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 12:17 [Qemu-devel] [PATCH 0/2] blkverify: Fix BDS leak in .bdrv_open error path Kevin Wolf
2015-10-13 12:17 ` [Qemu-devel] [PATCH 1/2] block: Allow bdrv_unref_child(bs, NULL) Kevin Wolf
2015-10-13 12:22 ` Jeff Cody
2015-10-13 12:17 ` Kevin Wolf [this message]
2015-10-13 12:35 ` [Qemu-devel] [PATCH 2/2] blkverify: Fix BDS leak in .bdrv_open error path Jeff Cody
2015-10-26 11:26 ` [Qemu-devel] [Qemu-block] [PATCH 0/2] " Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1444738660-18285-3-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=jcody@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).