Stefan Reinauer has uploaded this change for review. ( https://review.coreboot.org/c/em100/+/37419 )
Change subject: Fix CID 264285 Resource leak ......................................................................
Fix CID 264285 Resource leak
get_em100_file() allocates memory for the file name, so we have to free it again.
Signed-off-by: Stefan Reinauer stefan.reinauer@coreboot.org Change-Id: I59b7eafc828fd1a2e48e4b8a84708bfeff05c8f1 --- M em100.c 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/em100 refs/changes/19/37419/1
diff --git a/em100.c b/em100.c index ad341e8..d17b707 100644 --- a/em100.c +++ b/em100.c @@ -666,7 +666,9 @@ static chipdesc *setup_chips(const char *desiredchip) { static chipdesc chip; - configs = tar_load_compressed(get_em100_file("configs.tar.xz")); + char *configs_name = get_em100_file("configs.tar.xz"); + configs = tar_load_compressed(configs_name); + free(configs_name); if (!configs) { printf("Can't find chip configs in $EM100_HOME/configs.tar.xz.\n"); return NULL;