Thomas Heijligen has uploaded this change for review. ( https://review.coreboot.org/c/flashrom/+/58583 )
Change subject: pony_spi: fix memory leak ......................................................................
pony_spi: fix memory leak
free data if sp_openserport() faild and pony_spi_init() return early with 1.
Change-Id: I11858bd0bdfe8b6d03af616fe4be4fb047b8dcd9 Signed-off-by: Thomas Heijligen thomas.heijligen@secunet.com --- M pony_spi.c 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/83/58583/1
diff --git a/pony_spi.c b/pony_spi.c index 6005bd4..86ef238 100644 --- a/pony_spi.c +++ b/pony_spi.c @@ -145,6 +145,7 @@ sp_fd = sp_openserport(arg, 9600); if (sp_fd == SER_INV_FD) { free(arg); + free(data); return 1; } if (register_shutdown(pony_spi_shutdown, data) != 0) {