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>
This commit is contained in:
Patrick Georgi 2017-01-02 18:54:28 +01:00 committed by Patrick Georgi
parent 384ebc610d
commit 61dbbf65c3
1 changed files with 2 additions and 0 deletions

View File

@ -14376,6 +14376,8 @@ static void expand_function_call(
/* Update the called functions closure variable */ /* Update the called functions closure variable */
closure_idx = add_closure_type(state, func, closure_type); closure_idx = add_closure_type(state, func, closure_type);
free(closure_type);
closure_type = NULL;
/* Generate some needed triples */ /* Generate some needed triples */
ret_loc = label(state); ret_loc = label(state);