Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32841
Change subject: util/romcc: Free variable after it is used ......................................................................
util/romcc: Free variable after it is used
Free 'arg_type' after it is used to prevent a memory leak.
Found-by: Coverity Scan CID 1129114 Signed-off-by: Jacob Garber jgarber1@ualberta.ca Change-Id: I5e8661547bb7623463ed23fc45269049ffb8c50e --- M util/romcc/romcc.c 1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/41/32841/1
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index 43be171..e40c7d0 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -11236,6 +11236,7 @@
arg_type = arithmetic_result(state, left, right); sign = is_signed(arg_type); + xfree(arg_type); op = -1; switch(tok) { case TOK_LESS: op = sign? OP_SLESS : OP_ULESS; break;
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/32841 )
Change subject: util/romcc: Free variable after it is used ......................................................................
Patch Set 1: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/32841 )
Change subject: util/romcc: Free variable after it is used ......................................................................
util/romcc: Free variable after it is used
Free 'arg_type' after it is used to prevent a memory leak.
Found-by: Coverity Scan CID 1129114 Signed-off-by: Jacob Garber jgarber1@ualberta.ca Change-Id: I5e8661547bb7623463ed23fc45269049ffb8c50e Reviewed-on: https://review.coreboot.org/c/coreboot/+/32841 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Patrick Georgi pgeorgi@google.com --- M util/romcc/romcc.c 1 file changed, 1 insertion(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved
diff --git a/util/romcc/romcc.c b/util/romcc/romcc.c index 97cc219..bf0510a 100644 --- a/util/romcc/romcc.c +++ b/util/romcc/romcc.c @@ -11236,6 +11236,7 @@
arg_type = arithmetic_result(state, left, right); sign = is_signed(arg_type); + xfree(arg_type); op = -1; switch(tok) { case TOK_LESS: op = sign? OP_SLESS : OP_ULESS; break;