qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Liang Yan <lyan@suse.com>
To: samuel.thibault@ens-lyon.org, pbonzini@redhat.com,
	marcandre.lureau@redhat.com
Cc: qemu-devel@nongnu.org, qemu-trivial@nongnu.org
Subject: [Qemu-trivial] [PATCH] chardev/baum: fix baum that releases brlapi twice
Date: Fri, 22 Sep 2017 18:55:33 -0400	[thread overview]
Message-ID: <20170922225533.1928-1-lyan@suse.com> (raw)

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>
---
 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-22 22:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 22:55 Liang Yan [this message]
2017-09-24 16:56 ` [Qemu-trivial] [PATCH] chardev/baum: fix baum that releases brlapi twice Marc-André Lureau
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=20170922225533.1928-1-lyan@suse.com \
    --to=lyan@suse.com \
    --cc=marcandre.lureau@redhat.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).