[PATCH 2/9] target/mips: Fix more TCG temporary leaks in gen_pool32a5_nanomips_insn

Philippe Mathieu-Daudé posted 9 patches 4 years, 7 months ago
Maintainers: Jiaxun Yang <jiaxun.yang@flygoat.com>, Aurelien Jarno <aurelien@aurel32.net>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>
[PATCH 2/9] target/mips: Fix more TCG temporary leaks in gen_pool32a5_nanomips_insn
Posted by Philippe Mathieu-Daudé 4 years, 7 months ago
Fix multiple TCG temporary leaks in gen_pool32a5_nanomips_insn().

Fixes: 3285a3e4445 ("target/mips: Add emulation of DSP ASE for nanoMIPS - part 1")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 target/mips/tcg/translate.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c
index b92a473f870..4b7229a868a 100644
--- a/target/mips/tcg/translate.c
+++ b/target/mips/tcg/translate.c
@@ -20298,6 +20298,10 @@ static void gen_pool32a5_nanomips_insn(DisasContext *ctx, int opc,
         gen_reserved_instruction(ctx);
         break;
     }
+
+    tcg_temp_free(v2_t);
+    tcg_temp_free(v1_t);
+    tcg_temp_free(t0);
 }
 
 static int decode_nanomips_32_48_opc(CPUMIPSState *env, DisasContext *ctx)
-- 
2.31.1

Re: [PATCH 2/9] target/mips: Fix more TCG temporary leaks in gen_pool32a5_nanomips_insn
Posted by Richard Henderson 4 years, 7 months ago
On 6/17/21 10:43 AM, Philippe Mathieu-Daudé wrote:
> Fix multiple TCG temporary leaks in gen_pool32a5_nanomips_insn().
> 
> Fixes: 3285a3e4445 ("target/mips: Add emulation of DSP ASE for nanoMIPS - part 1")
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   target/mips/tcg/translate.c | 4 ++++
>   1 file changed, 4 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~