Skip to content

Commit 2a5eec6

Browse files
chalapathi-vMichael Tokarev
authored andcommitted
hw/ssi/pnv_spi: Fixes Coverity CID 1558831
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: [email protected] Fixes: Coverity CID 1558831 Signed-off-by: Chalapathi V <[email protected]> Fixes: b4cb930 ("hw/ssi: Extend SPI model") [PMD: Rebased on previous commit (returning earlier)] Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Signed-off-by: Nicholas Piggin <[email protected]> (cherry picked from commit 0313244) Signed-off-by: Michael Tokarev <[email protected]>
1 parent 2408ff8 commit 2a5eec6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

hw/ssi/pnv_spi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ static void transfer(PnvSpi *s, PnvXferBuffer *payload)
239239
}
240240
}
241241
spi_response(s, s->N1_bits, rsp_payload);
242+
pnv_spi_xfer_buffer_free(rsp_payload);
242243
}
243244

244245
static inline uint8_t get_seq_index(PnvSpi *s)

0 commit comments

Comments
 (0)