qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] block: Fix leak of ignore_children in error path
Date: Thu, 15 Mar 2018 07:25:30 -0500	[thread overview]
Message-ID: <7bcc631c-b52b-d098-a19e-661534d53057@redhat.com> (raw)
In-Reply-To: <20180315035157.6929-1-famz@redhat.com>

On 03/14/2018 10:51 PM, Fam Zheng wrote:
> Reported-by: Max Reitz <mreitz@redhat.com>
> Signed-off-by: Fam Zheng <famz@redhat.com>
> ---
>   block.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
> diff --git a/block.c b/block.c
> index 75a9fd49de..c1fda9fd57 100644
> --- a/block.c
> +++ b/block.c
> @@ -3671,12 +3671,12 @@ int bdrv_drop_intermediate(BlockDriverState *top, BlockDriverState *base,
>           GSList *ignore_children = g_slist_prepend(NULL, c);
>           bdrv_check_update_perm(base, NULL, c->perm, c->shared_perm,
>                                  ignore_children, &local_err);
> +        g_slist_free(ignore_children);
>           if (local_err) {
>               ret = -EPERM;
>               error_report_err(local_err);
>               goto exit;
>           }
> -        g_slist_free(ignore_children);
>   
>           /* If so, update the backing file path in the image file */
>           if (c->role->update_filename) {
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

  reply	other threads:[~2018-03-15 12:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15  3:51 [Qemu-devel] [PATCH] block: Fix leak of ignore_children in error path Fam Zheng
2018-03-15 12:25 ` Eric Blake [this message]
2018-03-15 12:52 ` [Qemu-devel] [Qemu-block] " Alberto Garcia
2018-03-15 16:41 ` [Qemu-devel] " Kevin Wolf

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=7bcc631c-b52b-d098-a19e-661534d53057@redhat.com \
    --to=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@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).