From: Shannon Zhao <zhaoshenglong@huawei.com>
To: qemu-devel@nongnu.org
Cc: qemu-trivial@nongnu.org, mjt@tls.msk.ru, shannon.zhao@linaro.org
Subject: [Qemu-devel] [PATCH 10/10] hw/openrisc/pic_cpu.c: use qemu_allocate_irq to fix memory leak
Date: Thu, 2 Jul 2015 17:49:23 +0800 [thread overview]
Message-ID: <1435830563-3072-11-git-send-email-zhaoshenglong@huawei.com> (raw)
In-Reply-To: <1435830563-3072-1-git-send-email-zhaoshenglong@huawei.com>
From: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
hw/openrisc/pic_cpu.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/openrisc/pic_cpu.c b/hw/openrisc/pic_cpu.c
index 2af1d60..5060214 100644
--- a/hw/openrisc/pic_cpu.c
+++ b/hw/openrisc/pic_cpu.c
@@ -51,10 +51,8 @@ static void openrisc_pic_cpu_handler(void *opaque, int irq, int level)
void cpu_openrisc_pic_init(OpenRISCCPU *cpu)
{
int i;
- qemu_irq *qi;
- qi = qemu_allocate_irqs(openrisc_pic_cpu_handler, cpu, NR_IRQS);
for (i = 0; i < NR_IRQS; i++) {
- cpu->env.irq[i] = qi[i];
+ cpu->env.irq[i] = qemu_allocate_irq(openrisc_pic_cpu_handler, cpu, i);
}
}
--
2.0.4
prev parent reply other threads:[~2015-07-02 9:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-02 9:49 [Qemu-devel] [PATCH 00/10] fix memory leak Shannon Zhao
2015-07-02 9:49 ` [Qemu-devel] [PATCH 01/10] hw/ppc/ppc4xx_devs.c: Convert ppcuic to QOM Shannon Zhao
2015-07-02 9:49 ` [Qemu-devel] [PATCH 02/10] include/hw/sparc/grlib.h: Store irqs in DeviceState Shannon Zhao
2015-07-02 9:49 ` [Qemu-devel] [PATCH 03/10] hw/m68k/mcf5206.c: convert m5206_mbar to QOM Shannon Zhao
2015-07-02 9:49 ` [Qemu-devel] [PATCH 04/10] hw/m68k/mcf_intc.c: convert mcf_intc " Shannon Zhao
2015-07-02 9:49 ` [Qemu-devel] [PATCH 05/10] hw/sh4/r2d.c: convert r2d_fpga " Shannon Zhao
2015-07-02 9:49 ` [Qemu-devel] [PATCH 06/10] hw/arm/palm.c: Fix misusing qemu_allocate_irqs Shannon Zhao
2015-07-02 9:49 ` [Qemu-devel] [PATCH 07/10] hw/arm/spitz.c: " Shannon Zhao
2015-07-02 9:49 ` [Qemu-devel] [PATCH 08/10] hw/arm/tosa.c: " Shannon Zhao
2015-07-02 9:49 ` [Qemu-devel] [PATCH 09/10] hw/mips/mips_int.c: use qemu_allocate_irq to fix memory leak Shannon Zhao
2015-07-02 9:49 ` Shannon Zhao [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1435830563-3072-11-git-send-email-zhaoshenglong@huawei.com \
--to=zhaoshenglong@huawei.com \
--cc=mjt@tls.msk.ru \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=shannon.zhao@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).