aboutsummaryrefslogtreecommitdiff
path: root/hw/irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/irq.c')
-rw-r--r--hw/irq.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/irq.c b/hw/irq.c
index 4035a8cbff..60eabe8901 100644
--- a/hw/irq.c
+++ b/hw/irq.c
@@ -44,8 +44,8 @@ qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n)
struct IRQState *p;
int i;
- s = (qemu_irq *)qemu_mallocz(sizeof(qemu_irq) * n);
- p = (struct IRQState *)qemu_mallocz(sizeof(struct IRQState) * n);
+ s = (qemu_irq *)g_malloc0(sizeof(qemu_irq) * n);
+ p = (struct IRQState *)g_malloc0(sizeof(struct IRQState) * n);
for (i = 0; i < n; i++) {
p->handler = handler;
p->opaque = opaque;
@@ -58,8 +58,8 @@ qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n)
void qemu_free_irqs(qemu_irq *s)
{
- qemu_free(s[0]);
- qemu_free(s);
+ g_free(s[0]);
+ g_free(s);
}
static void qemu_notirq(void *opaque, int line, int level)
@@ -85,7 +85,7 @@ static void qemu_splitirq(void *opaque, int line, int level)
qemu_irq qemu_irq_split(qemu_irq irq1, qemu_irq irq2)
{
- qemu_irq *s = qemu_mallocz(2 * sizeof(qemu_irq));
+ qemu_irq *s = g_malloc0(2 * sizeof(qemu_irq));
s[0] = irq1;
s[1] = irq2;
return qemu_allocate_irqs(qemu_splitirq, s, 1)[0];