summaryrefslogtreecommitdiff
path: root/util/romcc
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2017-01-02 18:54:28 +0100
committerPatrick Georgi <pgeorgi@google.com>2017-01-03 22:16:15 +0100
commit61dbbf65c3423ba7903fca960e9da892b96a534c (patch)
tree667946720137f96d89e157f15f14f180fff28039 /util/romcc
parent384ebc610d5a514586b2b56e6b5f1601fda4d3e5 (diff)
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 <pgeorgi@chromium.org> Found-by: Coverity Scan #1287073 Reviewed-on: https://review.coreboot.org/18015 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'util/romcc')
-rw-r--r--util/romcc/romcc.c2
1 files changed, 2 insertions, 0 deletions
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);