diff mbox series

[PULL,5/6] target/m68k: Fix a tcg_temp leak

Message ID 20190516223519.7520-6-laurent@vivier.eu
State New
Headers show
Series [PULL,1/6] target/m68k: In dump_address_map() checkfor memory access failures | expand

Commit Message

Laurent Vivier May 16, 2019, 10:35 p.m. UTC
From: Philippe Mathieu-Daudé <f4bug@amsat.org>

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>
---
 target/m68k/translate.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/target/m68k/translate.c b/target/m68k/translate.c
index 176c5d966c..bf700c01b1 100644
--- a/target/m68k/translate.c
+++ b/target/m68k/translate.c
@@ -2227,6 +2227,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;
 }