qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: Liang Yan <lyan@suse.com>
Cc: samuel thibault <samuel.thibault@ens-lyon.org>,
	pbonzini@redhat.com, qemu-devel@nongnu.org,
	qemu-trivial@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice
Date: Sun, 24 Sep 2017 12:56:11 -0400 (EDT)	[thread overview]
Message-ID: <1327714502.20871949.1506272171027.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20170922225533.1928-1-lyan@suse.com>



----- Original Message -----
> Error process of baum_chr_open needs to set brlapi null, so it won't
> get released twice in char_braille_finalize, which will cause
> "/usr/bin/qemu-system-x86_64: double free or corruption (!prev)"
> 
> Signed-off-by: Liang Yan <lyan@suse.com>

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>

> ---
>  chardev/baum.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/chardev/baum.c b/chardev/baum.c
> index 302dd9666c..67fd783a59 100644
> --- a/chardev/baum.c
> +++ b/chardev/baum.c
> @@ -643,6 +643,7 @@ static void baum_chr_open(Chardev *chr,
>          error_setg(errp, "brlapi__openConnection: %s",
>                     brlapi_strerror(brlapi_error_location()));
>          g_free(handle);
> +        baum->brlapi = NULL;
>          return;
>      }
>      baum->deferred_init = 0;
> --
> 2.14.1
> 
> 

  reply	other threads:[~2017-09-24 16:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 22:55 [Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice Liang Yan
2017-09-24 16:56 ` Marc-André Lureau [this message]
2017-09-24 20:49 ` Michael Tokarev

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=1327714502.20871949.1506272171027.JavaMail.zimbra@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=lyan@suse.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=samuel.thibault@ens-lyon.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).