From patchwork Fri Jan 4 10:47:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 10748247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3935617E6 for ; Fri, 4 Jan 2019 10:50:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 234D527F86 for ; Fri, 4 Jan 2019 10:50:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1448028329; Fri, 4 Jan 2019 10:50:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,FSL_HELO_FAKE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B11D327F86 for ; Fri, 4 Jan 2019 10:50:02 +0000 (UTC) Received: from localhost ([127.0.0.1]:34023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfN3C-0005QQ-1L for patchwork-qemu-devel@patchwork.kernel.org; Fri, 04 Jan 2019 05:50:02 -0500 Received: from eggs.gnu.org ([208.118.235.92]:42466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gfN1A-0003tU-CB for qemu-devel@nongnu.org; Fri, 04 Jan 2019 05:47:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gfN18-0000B9-N4 for qemu-devel@nongnu.org; Fri, 04 Jan 2019 05:47:56 -0500 Received: from mail-lj1-x244.google.com ([2a00:1450:4864:20::244]:40289) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gfN18-0000Aq-GS; Fri, 04 Jan 2019 05:47:54 -0500 Received: by mail-lj1-x244.google.com with SMTP id n18-v6so32095919lji.7; Fri, 04 Jan 2019 02:47:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EepWp/NDzRBMEO2GQZVIcEc4umOS3wkI7i2w4vM6W78=; b=ZyKeV6UFa4eX9zC4ecG1qd0tJFJO+7sPI790Ws5y5ogdJHw5YNQJ8+8mRjS1LQbw7L gHfKPdW9mg++5QdPPVe+ecl+4sHMgt53+TwHVnzC2LxSn3IYYl/a626kIoVSMLqCvQvA 3YncntUCE7ADAi2gpktbPZ0wCM4r3Uyxb26UI46fwFhbccCgQpmL0wi82da1KDlMazDT 65IUJmsigLEmIk8NEgpJDbUHQN3wn9F3G6IPyod8deIGxpYdywpYupTsXkQ7Ujj2stmC 1nGduN1Vil+uae53Hf+vrXqAUtiu/5ckMOYVFVpFxyVHKZ+bJnjx9kvaohBcvYjCcxHn RLlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EepWp/NDzRBMEO2GQZVIcEc4umOS3wkI7i2w4vM6W78=; b=CF4TRc1I65UTpZGRvVDyHKtuPgC+gXpfd7jugvGleLtEu/MmINJwJSRQ2eNi8xgx2B fq3V8FSCtb/7GhAOTtpR732BN6cnijcOPt1QFm97dW+nMs/gLsc1sUIx0mh1k4G+i7zz X5D0GI7bfrrM1s8LhiJlUL3DMpzchaqsspCc7PnkpWk0ccHUmfFiXSOVx23S/UI/AfHl kDm9QOrvO0kQo/UgIldlgRwl+m43AZ4Q2+vMi24ACD/bynDCDunCJW3UvIeEuu4osKIm Ti9bm8uNgYgisl2Z1uRPUpCVWyO4qyYy4OUE+5FA1KwmYy5vtP4UJxYxqiqw6fDWgWpw mQMA== X-Gm-Message-State: AA+aEWbmaZ8yOrRU7np2R8yOKsbYVgROZSShEK3MJpoggYn+hsGX3kud i+y9QqAM0FLqwrW4NddpNu6A9S/1Zas= X-Google-Smtp-Source: ALg8bN73IOhLPgpSnd84Ha4XasOq0ohLqdOB3odU8Tc1eOVXuvnqLYzjVNAJubKyEKcWrv0l9vOu1Q== X-Received: by 2002:a2e:9655:: with SMTP id z21-v6mr31631399ljh.136.1546598872903; Fri, 04 Jan 2019 02:47:52 -0800 (PST) Received: from gmail.com (81-231-232-130-no39.tbcn.telia.com. [81.231.232.130]) by smtp.gmail.com with ESMTPSA id t18sm11002520lft.93.2019.01.04.02.47.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 04 Jan 2019 02:47:52 -0800 (PST) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org, qemu-arm@nongnu.org Date: Fri, 4 Jan 2019 11:47:49 +0100 Message-Id: <20190104104749.5314-2-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190104104749.5314-1-edgar.iglesias@gmail.com> References: <20190104104749.5314-1-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::244 Subject: [Qemu-devel] [PATCH v1 1/1] hw/arm: versal: Plug memory leaks 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: figlesia@xilinx.com, peter.maydell@linaro.org, sstabellini@kernel.org, edgar.iglesias@xilinx.com, sai.pavan.boddu@xilinx.com, frasse.iglesias@gmail.com, alistair@alistair23.me, frederic.konrad@adacore.com, philmd@redhat.com, luc.michel@greensocs.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Plug a couple of "board creation time" memory leaks. Reported-by: Peter Maydell Signed-off-by: Edgar E. Iglesias Reviewed-by: Philippe Mathieu-Daudé --- hw/arm/xlnx-versal-virt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c index c6feeac532..f95fde2309 100644 --- a/hw/arm/xlnx-versal-virt.c +++ b/hw/arm/xlnx-versal-virt.c @@ -130,6 +130,7 @@ static void fdt_add_gic_nodes(VersalVirt *s) 2, MM_GIC_APU_REDIST_0_SIZE); qemu_fdt_setprop_cell(s->fdt, nodename, "#interrupt-cells", 3); qemu_fdt_setprop_string(s->fdt, nodename, "compatible", "arm,gic-v3"); + g_free(nodename); } static void fdt_add_timer_nodes(VersalVirt *s) @@ -364,6 +365,7 @@ static void create_virtio_regions(VersalVirt *s) sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic_irq); mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0); memory_region_add_subregion(&s->soc.mr_ps, base, mr); + g_free(name); } for (i = 0; i < NUM_VIRTIO_TRANSPORT; i++) {