summaryrefslogtreecommitdiffstats
path: root/print.c
diff options
context:
space:
mode:
authorJacob Garber <jgarber1@ualberta.ca>2019-08-12 14:31:46 -0600
committerNico Huber <nico.h@gmx.de>2019-09-24 19:07:45 +0000
commit4a7970bc98c5bacd2cebcc2b4a3a39be304a1cae (patch)
treeedf5151351669ba16c2d845974997ad398494200 /print.c
parentba7199958c9eef803845dcd9f3930277bbf9eb76 (diff)
downloadflashrom-4a7970bc98c5bacd2cebcc2b4a3a39be304a1cae.tar.gz
flashrom-4a7970bc98c5bacd2cebcc2b4a3a39be304a1cae.tar.bz2
flashrom-4a7970bc98c5bacd2cebcc2b4a3a39be304a1cae.zip
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 <jgarber1@ualberta.ca> Found-by: Coverity CID 1403822 Reviewed-on: https://review.coreboot.org/c/flashrom/+/34849 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'print.c')
-rw-r--r--print.c1
1 files changed, 1 insertions, 0 deletions
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);