From: Greg Kurz Date: Fri, 22 Mar 2019 18:03:40 +0000 (+0100) Subject: target/ppc: Fix TCG temporary leaks in gen_bcond() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9acc95cdd309f1bd4655219887676c332f945204;p=qemu.git target/ppc: Fix TCG temporary leaks in gen_bcond() Signed-off-by: Greg Kurz Message-Id: <155327782047.1283071.10234727692461848972.stgit@bahia.lan> Tested-by: Suraj Jitindar Singh Signed-off-by: David Gibson --- diff --git a/target/ppc/translate.c b/target/ppc/translate.c index 98b37cebc2..aaafa3a715 100644 --- a/target/ppc/translate.c +++ b/target/ppc/translate.c @@ -3749,6 +3749,8 @@ static void gen_bcond(DisasContext *ctx, int type) TCGv temp = tcg_temp_new(); if (unlikely(type == BCOND_CTR)) { gen_inval_exception(ctx, POWERPC_EXCP_INVAL_INVAL); + tcg_temp_free(temp); + tcg_temp_free(target); return; } tcg_gen_subi_tl(cpu_ctr, cpu_ctr, 1);