[flashrom] [PATCH] CID1130006: Resource leak

Stefan Reinauer stefan.reinauer at coreboot.org
Tue Nov 19 20:35:57 CET 2013


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 at 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;




More information about the flashrom mailing list