From 4a7970bc98c5bacd2cebcc2b4a3a39be304a1cae Mon Sep 17 00:00:00 2001 From: Jacob Garber Date: Mon, 12 Aug 2019 14:31:46 -0600 Subject: print: Fix vendor string memory leak Freeing this string won't really matter in the incredible case that we run out of memory, but it keeps Coverity happy. Change-Id: I962d2f2227850473b70272bc48b3fc0a0fb11342 Signed-off-by: Jacob Garber Found-by: Coverity CID 1403822 Reviewed-on: https://review.coreboot.org/c/flashrom/+/34849 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks --- print.c | 1 + 1 file changed, 1 insertion(+) (limited to 'print.c') diff --git a/print.c b/print.c index 2901c5012..91e5ae5ee 100644 --- a/print.c +++ b/print.c @@ -184,6 +184,7 @@ static int print_supported_chips(void) dev = malloc(strlen(chip->name) + 1); if (dev == NULL) { msg_gerr("Out of memory!\n"); + free(ven); return 1; } strcpy(dev, chip->name); -- cgit v1.2.3