From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-io: Fix memory leak in 'aio_write -z'
Date: Mon, 9 May 2016 08:47:37 -0600 [thread overview]
Message-ID: <5730A309.9010004@redhat.com> (raw)
In-Reply-To: <1462788216-14009-1-git-send-email-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 929 bytes --]
On 05/09/2016 04:03 AM, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> ---
> qemu-io-cmds.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Eric Blake <eblake@redhat.com>
Perhaps it would be easier to convert all the mid-function returns into
'goto cleanup', so that we don't have to repeat the cleanups everywhere,
but that's more invasive.
>
> diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
> index e34f777..41580b5 100644
> --- a/qemu-io-cmds.c
> +++ b/qemu-io-cmds.c
> @@ -1699,6 +1699,7 @@ static int aio_write_f(BlockBackend *blk, int argc, char **argv)
> int64_t count = cvtnum(argv[optind]);
> if (count < 0) {
> print_cvtnum_err(count, argv[optind]);
> + g_free(ctx);
> return 0;
> }
>
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
prev parent reply other threads:[~2016-05-09 14:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 10:03 [Qemu-devel] [PATCH] qemu-io: Fix memory leak in 'aio_write -z' Kevin Wolf
2016-05-09 14:47 ` Eric Blake [this message]
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=5730A309.9010004@redhat.com \
--to=eblake@redhat.com \
--cc=kwolf@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).