From nobody Wed Oct 29 06:44:04 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) 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=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524826993546422.10606130038923; Fri, 27 Apr 2018 04:03:13 -0700 (PDT) Received: from localhost ([::1]:47302 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC19a-0004AZ-3r for importer@patchew.org; Fri, 27 Apr 2018 07:03:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56832) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC18Q-0003gi-Qb for qemu-devel@nongnu.org; Fri, 27 Apr 2018 07:01:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fC18P-0003Nw-TE for qemu-devel@nongnu.org; Fri, 27 Apr 2018 07:01:50 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:41194) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fC18O-0003Lf-0T; Fri, 27 Apr 2018 07:01:48 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fC18E-0001BU-EW; Fri, 27 Apr 2018 12:01:38 +0100 From: Peter Maydell To: qemu-arm@nongnu.org, qemu-devel@nongnu.org Date: Fri, 27 Apr 2018 12:01:37 +0100 Message-Id: <20180427110137.19304-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] hw/arm/iotkit.c: fix minor memory leak 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: patches@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Coverity (CID1390573) spots that we forgot to free the gpioname strings in a loop in the iotkit realize function. Correct the error. This isn't a significant leak, because this function only ever runs once. Signed-off-by: Peter Maydell Reviewed-by: Peter Xu Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- hw/arm/iotkit.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/iotkit.c b/hw/arm/iotkit.c index c5f0a5b98a..234185e8f7 100644 --- a/hw/arm/iotkit.c +++ b/hw/arm/iotkit.c @@ -517,6 +517,7 @@ static void iotkit_realize(DeviceState *dev, Error **er= rp) qdev_get_gpio_in(DEVICE(&s->ppc_irq_orgate),= i)); qdev_connect_gpio_out_named(DEVICE(ppc), "irq", 0, qdev_get_gpio_in(devs, 0)); + g_free(gpioname); } =20 iotkit_forward_sec_resp_cfg(s); --=20 2.17.0