From nobody Fri May 3 10:18:09 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 150612104956561.832096100231524; Fri, 22 Sep 2017 15:57:29 -0700 (PDT) Received: from localhost ([::1]:33063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvWsQ-0005Pf-2P for importer@patchew.org; Fri, 22 Sep 2017 18:56:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvWrX-0004z1-3Z for qemu-devel@nongnu.org; Fri, 22 Sep 2017 18:56:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvWrU-0006kw-1P for qemu-devel@nongnu.org; Fri, 22 Sep 2017 18:55:59 -0400 Received: from smtp.nue.novell.com ([195.135.221.5]:46555) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dvWrT-0006hC-Bl; Fri, 22 Sep 2017 18:55:55 -0400 Received: from emea4-mta.ukb.novell.com ([10.120.13.87]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Sat, 23 Sep 2017 00:55:52 +0200 Received: from linux-vqw3.gns.novell.com (nwb-a10-snat.microfocus.com [10.120.13.201]) by emea4-mta.ukb.novell.com with ESMTP (TLS encrypted); Fri, 22 Sep 2017 23:55:39 +0100 From: Liang Yan To: samuel.thibault@ens-lyon.org, pbonzini@redhat.com, marcandre.lureau@redhat.com Date: Fri, 22 Sep 2017 18:55:33 -0400 Message-Id: <20170922225533.1928-1-lyan@suse.com> X-Mailer: git-send-email 2.14.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 195.135.221.5 Subject: [Qemu-devel] [PATCH] chardev/baum: fix baum that releases brlapi twice X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_6 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Marc-Andr=C3=A9 Lureau --- 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 =3D NULL; return; } baum->deferred_init =3D 0; --=20 2.14.1