From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, benoit.canet@irqsave.net, stefanha@redhat.com,
josh.durgin@inktank.com
Subject: [Qemu-devel] [PATCH v2] rbd: Fix leaks in rbd_start_aio() error path
Date: Thu, 5 Jun 2014 16:19:26 +0200 [thread overview]
Message-ID: <1401977966-11664-1-git-send-email-kwolf@redhat.com> (raw)
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/rbd.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/block/rbd.c b/block/rbd.c
index 09af484..898fcfe 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -684,13 +684,16 @@ static BlockDriverAIOCB *rbd_start_aio(BlockDriverState *bs,
}
if (r < 0) {
- goto failed;
+ goto failed_completion;
}
return &acb->common;
+failed_completion:
+ rbd_aio_release(c);
failed:
g_free(rcb);
+ qemu_vfree(acb->bounce);
qemu_aio_release(acb);
return NULL;
}
--
1.8.3.1
next reply other threads:[~2014-06-05 14:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 14:19 Kevin Wolf [this message]
2014-06-05 14:40 ` [Qemu-devel] [PATCH v2] rbd: Fix leaks in rbd_start_aio() error path Benoît Canet
2014-06-05 22:02 ` Josh Durgin
2014-06-09 13:28 ` 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=1401977966-11664-1-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=benoit.canet@irqsave.net \
--cc=josh.durgin@inktank.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
/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).