From nobody Thu Nov 13 19:25:46 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1582107839; cv=none; d=zohomail.com; s=zohoarc; b=JHyVe//TLeu6PgmNq/TxqBcRmoEi3PPGuN24Fty746DNewK3Pe8FT+BLID42lUQ6+GEK75sDMcAwNNDAI1kUu7bQX8lKdm1Ch/YOWT+2FXDj5SbBYazbpGN+0GvSecm7ZWZzsh4TO+5pdoIqUKjwUukV79L6LUFtBAlrRewzybc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582107839; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=J4Zt3pR9u9TMVh80kCuYFtCHnwg2Z7n01pc7XlDtFm8=; b=UkMYHidJxrWDoT6RdI3q4/+VGwTwn1eYAMB/gyTqZcEOQfGZf5dnOIbMbmGUsK59Xi4oTLCeEMtkjtEH3xUWbcipi+GYnkFxgpG6ANnPlzfCWRNmIQEdHh8kJ5POJis3CdiZ4D/njZFTbj0rZlTLom8h1FloVcc88Ve9uqufsik= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582107839522233.56257526020772; Wed, 19 Feb 2020 02:23:59 -0800 (PST) Received: from localhost ([::1]:48496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4MWM-0000XF-Ew for importer@patchew.org; Wed, 19 Feb 2020 05:23:58 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:53851) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4MQ8-0004Ax-Rp for qemu-devel@nongnu.org; Wed, 19 Feb 2020 05:17:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4MQ3-0005oo-Sb for qemu-devel@nongnu.org; Wed, 19 Feb 2020 05:17:32 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:43541) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j4MPu-0005VQ-Iy; Wed, 19 Feb 2020 05:17:18 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1McHM2-1jaONM07IK-00cgh9; Wed, 19 Feb 2020 11:16:52 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PULL 17/17] hw/xtensa/xtfpga:fix leak of fdevice tree blob Date: Wed, 19 Feb 2020 11:16:12 +0100 Message-Id: <20200219101612.1033925-18-laurent@vivier.eu> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200219101612.1033925-1-laurent@vivier.eu> References: <20200219101612.1033925-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:2d2DdnBIT4QzL6xniwXm6iBbRodr9Z9EJgRhZyD11lTxEOZi5ih jzkXcdw805ZSlb6qs8qrMskTlO9hiW7BdZveZ84yjog/lIFx1wRSYviWMpcjXcPI0zgAubW NXKwC90SodKEbaHPzlw6hOApbQf9VEM90b94R7XuCuiutC24oWen4Tz8gyudsuQGxB/EIfE FbJTPSbTwBM0rX0y4XZuA== X-UI-Out-Filterresults: notjunk:1;V03:K0:ARdIMovQ8QM=:/udeQ+opwPyE+3PMD2T7+V LV1U6CoLgQ6itRUERxmiE70V3DBGdEpWWaMs9IB3K6bXN4f1/BByhpLE9O+36Ar4pPe1HwvIH TOXgnrH/qnnWVCIEUe2rTH/h5wIPATlnj8sdzWb3qJnGHJZ1fRNH4dLx6zppMCTxCYZvpJgOe eeV55IDrlwpTr72z5x2LI88zvd0sInaReVNpp89HjCf9P/99WQHaqVEx4viTpHCpes20Fpcmz 4wm76XRFL//ozV/V+TRQ19ouAd8LfuFNYkXoNkj5Yq8BSsVlRdhruTH2zHfjDJovglTb0OzMZ zeo7Lq5T1YgbRPBaO2nPSCQR51p0qEXqEpgsDMvKlj/1gSV5Eza8uHgoZ+KK+guCQcJl3xKs0 RTUIs7GaNcJsmJo3cxdvpO7MKCX5BNeEtx3SrgwjXIqT3LogOnNGwtU0C1Z9m4jwYEbElEUgV zJZeSSJ8nQ+wjcYatF3hE+tJ9PDd3TVFob3RXuGDkZS0mD72NS8RYRhJ8eWXWPUUpNcW71ngP f8shO4TBD2W8uoShLtCpe9Bz+f0vMkL1z9/8Aihhy2A3tVFesQi1WzcjgLdGsn8j8gdY593Rk PTUKcEhlHnId5M9KkGzPxjXGpLsLFnWCXVIiPu+OasCTE+UTfmQkcB9WIbRBfLMUqAFJWO4Dk IIhi8BzCaYWpWqzuwa5955FTb9kYgtchip15rCD4ZxPV2cTKHQ99wOE6H6Utlnvj7osOJsEG9 5J3rPAECW7z7U6AMb754HNcxu3XmyQuhRV3ujJdcV2iE6tK4S2omcn6b0pE9sopU03yXkm+oF ZHND4497IU9FXGHMi6zCtg9ZP+50YP7QCiwPQQPY+4+/yUo1ouO6KBbko3Kj7FFOmaNhqDz X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.73 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Peter Maydell , Jason Wang , Michael Tokarev , Yuval Shaia , Max Filippov , Gerd Hoffmann , "Edgar E. Iglesias" , Marek Vasut , qemu-block@nongnu.org, qemu-trivial@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Thomas Huth , Jiri Pirko , Eduardo Habkost , Alistair Francis , Alex Williamson , qemu-arm@nongnu.org, Chen Qun , Richard Henderson , Kevin Wolf , Thomas Huth , Chris Wulff , Laurent Vivier , Max Reitz , Euler Robot , Paolo Bonzini Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Chen Qun The device tree blob returned by load_device_tree is malloced. We should free it after cpu_physical_memory_write(). Reported-by: Euler Robot Signed-off-by: Chen Qun Acked-by: Max Filippov Reviewed-by: Laurent Vivier Message-Id: <20200218091154.21696-4-kuhn.chenqun@huawei.com> Signed-off-by: Laurent Vivier --- hw/xtensa/xtfpga.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index 8e2dd1327a46..60ccc74f5f1d 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -380,6 +380,7 @@ static void xtfpga_init(const XtfpgaBoardDesc *board, M= achineState *machine) cur_tagptr =3D put_tag(cur_tagptr, BP_TAG_FDT, sizeof(dtb_addr), &dtb_addr); cur_lowmem =3D QEMU_ALIGN_UP(cur_lowmem + fdt_size, 4 * KiB); + g_free(fdt); } #else if (dtb_filename) { --=20 2.24.1