From: "Benoît Canet" <benoit.canet@irqsave.net>
To: Kevin Wolf <kwolf@redhat.com>
Cc: benoit.canet@irqsave.net, josh.durgin@inktank.com,
qemu-devel@nongnu.org, stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] rbd: Fix leaks in rbd_start_aio() error path
Date: Thu, 5 Jun 2014 16:40:43 +0200 [thread overview]
Message-ID: <20140605144043.GA6287@irqsave.net> (raw)
In-Reply-To: <1401977966-11664-1-git-send-email-kwolf@redhat.com>
The Thursday 05 Jun 2014 à 16:19:26 (+0200), Kevin Wolf wrote :
> 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
>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
next prev parent reply other threads:[~2014-06-05 14:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 14:19 [Qemu-devel] [PATCH v2] rbd: Fix leaks in rbd_start_aio() error path Kevin Wolf
2014-06-05 14:40 ` Benoît Canet [this message]
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=20140605144043.GA6287@irqsave.net \
--to=benoit.canet@irqsave.net \
--cc=josh.durgin@inktank.com \
--cc=kwolf@redhat.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).