Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/34849 )
Change subject: print: Fix vendor string memory leak ......................................................................
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 --- M print.c 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/49/34849/1
diff --git a/print.c b/print.c index 2901c50..91e5ae5 100644 --- a/print.c +++ b/print.c @@ -184,6 +184,7 @@ dev = malloc(strlen(chip->name) + 1); if (dev == NULL) { msg_gerr("Out of memory!\n"); + free(ven); return 1; } strcpy(dev, chip->name);
David Hendricks has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/34849 )
Change subject: print: Fix vendor string memory leak ......................................................................
Patch Set 1: Code-Review+2
Nico Huber has submitted this change. ( https://review.coreboot.org/c/flashrom/+/34849 )
Change subject: print: Fix vendor string memory leak ......................................................................
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 --- M print.c 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified David Hendricks: Looks good to me, approved
diff --git a/print.c b/print.c index 2901c50..91e5ae5 100644 --- a/print.c +++ b/print.c @@ -184,6 +184,7 @@ dev = malloc(strlen(chip->name) + 1); if (dev == NULL) { msg_gerr("Out of memory!\n"); + free(ven); return 1; } strcpy(dev, chip->name);