From 61dbbf65c3423ba7903fca960e9da892b96a534c Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Mon, 2 Jan 2017 18:54:28 +0100 Subject: util/romcc: free variable after use closure_type is copied then never used again. Close that leak. Change-Id: Idd4201f7fc6495fde5ad2e1feb7e499e38986e92 Signed-off-by: Patrick Georgi Found-by: Coverity Scan #1287073 Reviewed-on: https://review.coreboot.org/18015 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- util/romcc/romcc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'util/romcc') diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index baf8014f0a..2fa400af2b 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -14376,6 +14376,8 @@ static void expand_function_call( /* Update the called functions closure variable */ closure_idx = add_closure_type(state, func, closure_type); + free(closure_type); + closure_type = NULL; /* Generate some needed triples */ ret_loc = label(state); -- cgit v1.2.3