diff options
Diffstat (limited to 'cpus-common.c')
-rw-r--r-- | cpus-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpus-common.c b/cpus-common.c index 6e73d3e58d..db459b41ce 100644 --- a/cpus-common.c +++ b/cpus-common.c @@ -160,7 +160,7 @@ void async_run_on_cpu(CPUState *cpu, run_on_cpu_func func, run_on_cpu_data data) { struct qemu_work_item *wi; - wi = g_malloc0(sizeof(struct qemu_work_item)); + wi = g_new0(struct qemu_work_item, 1); wi->func = func; wi->data = data; wi->free = true; @@ -305,7 +305,7 @@ void async_safe_run_on_cpu(CPUState *cpu, run_on_cpu_func func, { struct qemu_work_item *wi; - wi = g_malloc0(sizeof(struct qemu_work_item)); + wi = g_new0(struct qemu_work_item, 1); wi->func = func; wi->data = data; wi->free = true; |