From ba7199958c9eef803845dcd9f3930277bbf9eb76 Mon Sep 17 00:00:00 2001 From: Jacob Garber Date: Mon, 12 Aug 2019 12:07:03 -0600 Subject: 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 Found-by: Coverity CID 1403823 Reviewed-on: https://review.coreboot.org/c/flashrom/+/34847 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks --- linux_mtd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux_mtd.c b/linux_mtd.c index ae8bef2fe..d2df95ef2 100644 --- a/linux_mtd.c +++ b/linux_mtd.c @@ -404,5 +404,6 @@ int linux_mtd_init(void) ret = 0; linux_mtd_init_exit: + free(param); return ret; } -- cgit v1.2.3