From: Chalapathi V <chalapathi.v@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org, fbarrat@linux.ibm.com, npiggin@gmail.com,
clg@kaod.org, calebs@linux.ibm.com, chalapathi.v@ibm.com,
chalapathi.v@linux.ibm.com, saif.abrar@linux.ibm.com,
dantan@us.ibm.com, milesg@linux.ibm.com
Subject: [PATCH v1 2/2] Fixes: Coverity CID 1558831
Date: Tue, 6 Aug 2024 19:18:29 +0530 [thread overview]
Message-ID: <20240806134829.351703-3-chalapathi.v@linux.ibm.com> (raw)
In-Reply-To: <20240806134829.351703-1-chalapathi.v@linux.ibm.com>
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.
Signed-off-by: Chalapathi V <chalapathi.v@linux.ibm.com>
---
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 a33f682897..dbe06df224 100644
--- a/hw/ssi/pnv_spi.c
+++ b/hw/ssi/pnv_spi.c
@@ -237,6 +237,7 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload)
}
if (rsp_payload != NULL) {
spi_response(s, s->N1_bits, rsp_payload);
+ pnv_spi_xfer_buffer_free(rsp_payload);
}
}
--
2.34.1
next prev parent reply other threads:[~2024-08-06 13:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-06 13:48 [PATCH v1 0/2] hw/ppc: SPI model - coverity fixes Chalapathi V
2024-08-06 13:48 ` [PATCH v1 1/2] Fixes: Coverity CID 1558827 Chalapathi V
2024-08-06 14:10 ` Philippe Mathieu-Daudé
2024-08-08 14:11 ` Peter Maydell
2024-08-06 13:48 ` Chalapathi V [this message]
2024-08-06 14:11 ` [PATCH v1 2/2] Fixes: Coverity CID 1558831 Philippe Mathieu-Daudé
2024-08-07 20:12 ` Philippe Mathieu-Daudé
2024-08-08 14:33 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240806134829.351703-3-chalapathi.v@linux.ibm.com \
--to=chalapathi.v@linux.ibm.com \
--cc=calebs@linux.ibm.com \
--cc=chalapathi.v@ibm.com \
--cc=clg@kaod.org \
--cc=dantan@us.ibm.com \
--cc=fbarrat@linux.ibm.com \
--cc=milesg@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=saif.abrar@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).