From patchwork Sun Sep 24 21:22:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Michael Tokarev X-Patchwork-Id: 114156 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp1956203qgf; Sun, 24 Sep 2017 15:44:09 -0700 (PDT) X-Google-Smtp-Source: AOwi7QAyonbz5CqI+KrazBKGEMQAzudav7KzKIh5+WodboxYaQcyfh4Q+WwtfUzQSyIgQTLSKGja X-Received: by 10.55.165.202 with SMTP id o193mr7992626qke.291.1506293049862; Sun, 24 Sep 2017 15:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506293049; cv=none; d=google.com; s=arc-20160816; b=04nnRbX1uLfHKZCPei4jlxunJkEp6foIxw3bJ5+EwVCbHZkkRrhiStL4w9cDyOl088 uIYrn5FonW1pe9Pc6a8rfvUcKx6rZ/JnTg3KLKHhJujp7K79D3ke/GisoJu3Cv8PLkhE 0N4qYWYghB3MB4kfMGQJlUQww5ax7qARpQ6OV5kS+KZqP7F8TZoqmJfW27db3ViiqZw3 CPNYF3HTUuQrT7x4oDpAxD3jJnk9obkcZfORpZnw7G5odPr3BYzcT72fHLNvgOy5XCg4 Czm4d6lEw3eNXQXeI2MNTLVA+Y8J4n0pnS9Y8I5GrCihnA3zkpWXqD923TYWt1LoHaaO 1erQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :references:in-reply-to:message-id:date:to:from :arc-authentication-results; bh=SqaUjksnllAgcTwbPtkQd1FgSGYdx6CUbuyKBQeypZs=; b=xo2Bv/iZ6krvBkVSMDKVeuaGS0hfQD4YTQl7L9TbDFiriij8vGudr/2Gfn5JTu8NKd kcd05G3oALTIJYOvWvWn0ZG3y6fVjWyPs6sUNNmRUTTFBMk7HiPieSleGYpCOuxtqfwh n4Gg9oPa8POgM/b3IBiJcWk1RYPg8OeI0FktzXv9pBODZa3qwgDqLPtAScyvbYXv1G1a X+z6rzE8seHyTHBJBjg4X0m4vJWVXhCkNbx9XKXaiTAvTRPGdQ2DBFL14ySFc4XmS3hd 6MfbwRaDRJ1jgqFxyxW+evGSQidPZYn0Jo4sX1bGMbmU2QtDHNXqdfUoImMC/qGJJy2O vYVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id n7si3633236qti.64.2017.09.24.15.44.09 for (version=TLS1 cipher=AES128-SHA bits=128/128); Sun, 24 Sep 2017 15:44:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org Received: from localhost ([::1]:39728 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwFd9-00045Z-OK for patch@linaro.org; Sun, 24 Sep 2017 18:44:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwFbE-0002pM-0K for qemu-devel@nongnu.org; Sun, 24 Sep 2017 18:42:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwFbA-00082j-3D for qemu-devel@nongnu.org; Sun, 24 Sep 2017 18:42:08 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:58441) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwFb9-00081f-Rn; Sun, 24 Sep 2017 18:42:04 -0400 Received: from tsrv.corpit.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 4136E41C78; Mon, 25 Sep 2017 01:42:00 +0300 (MSK) Received: from tls.msk.ru (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.corpit.ru (Postfix) with SMTP id 4F570B7B; Mon, 25 Sep 2017 00:22:55 +0300 (MSK) Received: (nullmailer pid 28284 invoked by uid 1000); Sun, 24 Sep 2017 21:22:52 -0000 From: Michael Tokarev To: qemu-devel@nongnu.org Date: Mon, 25 Sep 2017 00:22:40 +0300 Message-Id: <42c74252d68714894de4ba6d9c257dcd919e30b0.1506288070.git.mjt@msgid.tls.msk.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: In-Reply-To: References: MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 86.62.121.231 Subject: [Qemu-devel] [PULL 22/31] 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: Liang Yan , qemu-trivial@nongnu.org, Michael Tokarev Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Liang Yan 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é Lureau Signed-off-by: Michael Tokarev --- chardev/baum.c | 1 + 1 file changed, 1 insertion(+) -- 2.11.0 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;