From 6a9b110d54b885dbb29872a142cc4d2a402fada8 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Thu, 13 Jul 2017 14:04:00 -1000 Subject: [PATCH] target/alpha: Fix temp leak in gen_fbcond Tested-by: Emilio G. Cota Signed-off-by: Richard Henderson --- target/alpha/translate.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/target/alpha/translate.c b/target/alpha/translate.c index 326af7f463..aaaf28fb18 100644 --- a/target/alpha/translate.c +++ b/target/alpha/translate.c @@ -613,8 +613,12 @@ static ExitStatus gen_fbcond(DisasContext *ctx, TCGCond cond, int ra, int32_t disp) { TCGv cmp_tmp = tcg_temp_new(); + ExitStatus ret; + gen_fold_mzero(cond, cmp_tmp, load_fpr(ctx, ra)); - return gen_bcond_internal(ctx, cond, cmp_tmp, disp); + ret = gen_bcond_internal(ctx, cond, cmp_tmp, disp); + tcg_temp_free(cmp_tmp); + return ret; } static void gen_fcmov(DisasContext *ctx, TCGCond cond, int ra, int rb, int rc)