From nobody Sat Nov 23 22:29:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1730679661; cv=none; d=zohomail.com; s=zohoarc; b=Y2VQNoWF026uIKohIzQTe6h/qyMvdBo6/eF2sqDleBNwjunZpfQQm+bvDBKNhCDwsijDw5+Y0yDS2Z+OGityY4kbMeCoh7Yf6q6QLhpdL0XOgOh5RBtIEvzcg0QvO8laYuMpBK+z3l98zDjZjJ3D+i2jidEclJ6brRBMidK7aKo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1730679661; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ph5Kd9QXTfnsJFYyLPHoftiyt4e7iSLYLRytO4VxqSY=; b=aamgjf7XiARRxYCPtoISnW8We+yFE/SEiRommLQdXw50GDEjoQhURysH4zd1ZA0LZ5xac7QtMzVb+3JJSlEJIn318CrjwTBHqbbafglx7HehSKiglhNeadGs39XtCmZEOY/m+8EuyOwwNlYLbPeXxbTiEwxN2HEFZMrbb6oh5aI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1730679661153334.6892338295754; Sun, 3 Nov 2024 16:21:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t7kpD-0007Xg-1o; Sun, 03 Nov 2024 19:20:07 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t7kpC-0007Wy-4G; Sun, 03 Nov 2024 19:20:06 -0500 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t7kpA-0002Sa-Jb; Sun, 03 Nov 2024 19:20:05 -0500 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-71e7086c231so3039068b3a.0; Sun, 03 Nov 2024 16:20:03 -0800 (PST) Received: from wheely.local0.net (124-171-217-17.tpgi.com.au. [124.171.217.17]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-7ee45a0081esm5900648a12.59.2024.11.03.16.19.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Nov 2024 16:20:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730679602; x=1731284402; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ph5Kd9QXTfnsJFYyLPHoftiyt4e7iSLYLRytO4VxqSY=; b=BhaUk8AoULzp+ejChfic5yEFgxlSt1hHg3+IOZBHriwf8WMm4TonlpQJs5x7DeQSgM YOKucsLx4DTQK90JTCgPxHn9byXh+H9dPpn4+hHLEzpig/SIOR0uGZXbx14aOw7I/sCc jiAuyqGNaAkB5x0cdd4ZUuSduzd+mplRAAJ8SHqpU5fxPclFaVzRctjoTHPmrH2O1r+J dikrLzBLL302BnG8IChStORGyuneO5c5CuY6CiEQaQUZ0B5uJfCHvRGaE3OhyxL1Dmrd hweNnYLCpn6pBFzUdohexHu57vN0kwov+ZPH3s3JkfTvr/2WxKHvDea8TrpwdQRvnxJo XMwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730679602; x=1731284402; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ph5Kd9QXTfnsJFYyLPHoftiyt4e7iSLYLRytO4VxqSY=; b=fvqc3LAExbzlj+xLsgJfBJ18cyjAMda0Uo40Mo0tZ6h8ERS5TBW01cbYu1P9bruRnr cJVwomRF290MzwT+5sQk9MI++Patoq51+OPI0r8NZubnp443ZeS8roJYCBbk2icy7vQ6 eUwKas/hWrhJ5MNxluVz0WQGJ0b0l2W8tTf0iRW0MVfb/1IUXjtLwZ1H7ThBEgmbIw+T hj90TbJRo4E6TgOeNlicgR7YaBDjPTv2zuFL9ix1stsNkbcyMfXcoBHuIr3rbutzhRo5 ABQyY1wpCwOV7xVJrPP8AG5yEqUPMBIuqm56z+5faky5ILB1R+dO4lLISRTVePsGDYlr DVlg== X-Forwarded-Encrypted: i=1; AJvYcCWYsCgXGqavrgwIUe7+/KUVABdxEMtI+vdN7vt8Tw9YoafGKBU598Ywxs50/SZmJdB3MT5SrEEfXw==@nongnu.org, AJvYcCXB19V70d3SNl7NuGiYVcCm1QmKBEkEhijRgAfCEwbPexSXq1c1P2kjdaiy1Djm2w7Gc2ilaHYc/yny6K8=@nongnu.org X-Gm-Message-State: AOJu0YzqKtyM7cn2JXDxY20Wka9k1ZfBGws0fMhgmQZcag+VF/m3x/LK KgXdxiZwKdAP2dA/oVrpY14LiIeYgttFUEVuTKvDghKxg/eEgi3GHIHKWw== X-Google-Smtp-Source: AGHT+IFq3yLWRUyEiP8bjW+5GFICSUqSU6tsKjtujyZ35zLB+jgd7wQVXnsjkvmFHFAnaGNyhtynZw== X-Received: by 2002:a17:902:d544:b0:20c:7181:51c7 with SMTP id d9443c01a7336-210c6c8ff93mr422093255ad.52.1730679602160; Sun, 03 Nov 2024 16:20:02 -0800 (PST) From: Nicholas Piggin To: qemu-devel@nongnu.org Cc: Nicholas Piggin , qemu-ppc@nongnu.org, Chalapathi V , qemu-stable@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson Subject: [PULL 14/67] hw/ssi/pnv_spi: Fixes Coverity CID 1558831 Date: Mon, 4 Nov 2024 10:18:03 +1000 Message-ID: <20241104001900.682660-15-npiggin@gmail.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241104001900.682660-1-npiggin@gmail.com> References: <20241104001900.682660-1-npiggin@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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; Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=npiggin@gmail.com; helo=mail-pf1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1730679662994116600 From: Chalapathi V In this commit the following coverity scan defect has been fixed CID 1558831: Resource leaks (RESOURCE_LEAK) Variable "rsp_payload" going out of scope leaks the storage it points to. Cc: qemu-stable@nongnu.org Fixes: Coverity CID 1558831 Signed-off-by: Chalapathi V Fixes: b4cb930e40 ("hw/ssi: Extend SPI model") [PMD: Rebased on previous commit (returning earlier)] Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Signed-off-by: Nicholas Piggin --- hw/ssi/pnv_spi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ssi/pnv_spi.c b/hw/ssi/pnv_spi.c index 72bcc00de7..c21b2ebb3c 100644 --- a/hw/ssi/pnv_spi.c +++ b/hw/ssi/pnv_spi.c @@ -239,6 +239,7 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload) } } spi_response(s, s->N1_bits, rsp_payload); + pnv_spi_xfer_buffer_free(rsp_payload); } =20 static inline uint8_t get_seq_index(PnvSpi *s) --=20 2.45.2