Nico Huber submitted this change.

View Change

Approvals: build bot (Jenkins): Verified David Hendricks: Looks good to me, approved
linux_mtd: Fix param memory leak

extract_programmer_param() stores allocated memory in param, so make
sure it is freed at the end of the function.

Change-Id: I363e66b49c1ed4034ac058b94a938c8bb197e048
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 1403823
Reviewed-on: https://review.coreboot.org/c/flashrom/+/34847
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
---
M linux_mtd.c
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/linux_mtd.c b/linux_mtd.c
index ae8bef2..d2df95e 100644
--- a/linux_mtd.c
+++ b/linux_mtd.c
@@ -404,5 +404,6 @@

ret = 0;
linux_mtd_init_exit:
+ free(param);
return ret;
}

To view, visit change 34847. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I363e66b49c1ed4034ac058b94a938c8bb197e048
Gerrit-Change-Number: 34847
Gerrit-PatchSet: 2
Gerrit-Owner: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Nico Huber <nico.h@gmx.de>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged