UPSTREAM: util/romcc: free variable after use

closure_type is copied then never used again. Close that leak.

BUG=None
BRANCH=None
TEST=None

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>

Change-Id: Idd4201f7fc6495fde5ad2e1feb7e499e38986e92
Reviewed-on: https://chromium-review.googlesource.com/425284
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Patrick Georgi 2017-01-02 18:54:28 +01:00 committed by chrome-bot
parent ba4c55e34c
commit 1cb1fca53b

View file

@ -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);