CID1130006: Resource leak
The system resource will not be reclaimed and reused, reducing the future availability of the resource. In buspirate_spi_init: Leak of memory or pointers to system resources
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Index: buspirate_spi.c =================================================================== --- buspirate_spi.c (revision 1763) +++ buspirate_spi.c (working copy) @@ -250,6 +250,7 @@ if (!bp_commbuf) { bp_commbufsize = 0; msg_perr("Out of memory!\n"); + free(dev); return ERROR_OOM; } bp_commbufsize = DEFAULT_BUFSIZE;
On Tue, 19 Nov 2013 20:35:57 +0100 Stefan Reinauer stefan.reinauer@coreboot.org wrote:
CID1130006: Resource leak
The system resource will not be reclaimed and reused, reducing the future availability of the resource. In buspirate_spi_init: Leak of memory or pointers to system resources
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org
Index: buspirate_spi.c
--- buspirate_spi.c (revision 1763) +++ buspirate_spi.c (working copy) @@ -250,6 +250,7 @@ if (!bp_commbuf) { bp_commbufsize = 0; msg_perr("Out of memory!\n");
return ERROR_OOM; } bp_commbufsize = DEFAULT_BUFSIZE;free(dev);
Right, thanks. Coverity seems to have missed another leak in case register_shutdown() fails a few lines below this one. I have added my fix for that and committed them in r1778.