aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2019-03-10 01:34:25 +0100
committerMichael Roth <mdroth@linux.vnet.ibm.com>2019-07-30 14:33:20 -0500
commit19f55e7ab5f7cf4aadf6a3bc00dbfe752964e2a3 (patch)
treeadf95cc09f34091d732d0e2007a46e5f9a017f96
parentc6b77a64b4af9ad2efe5dd68047f1f0bd256d5fc (diff)
target/m68k: Fix a tcg_temp leak
The function gen_get_ccr() returns a tcg_temp created with tcg_temp_new(). Free it with tcg_temp_free(). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20190310003428.11723-4-f4bug@amsat.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu> (cherry picked from commit 44c64e90950adf9efe7f4235a32eb868d1290ebb) Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
-rw-r--r--target/m68k/translate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 752e46ef63..08e259d6ea 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -2226,6 +2226,7 @@ static TCGv gen_get_sr(DisasContext *s)
sr = tcg_temp_new();
tcg_gen_andi_i32(sr, QREG_SR, 0xffe0);
tcg_gen_or_i32(sr, sr, ccr);
+ tcg_temp_free(ccr);
return sr;
}