From: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- hw/xtensa/xtfpga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/xtensa/xtfpga.c b/hw/xtensa/xtfpga.c index a19ccebdba..c54a09df83 100644 --- a/hw/xtensa/xtfpga.c +++ b/hw/xtensa/xtfpga.c @@ -115,7 +115,7 @@ static const MemoryRegionOps lx60_fpga_ops = { static Lx60FpgaState *lx60_fpga_init(MemoryRegion *address_space, hwaddr base) { - Lx60FpgaState *s = g_malloc(sizeof(Lx60FpgaState)); + Lx60FpgaState *s = g_new(Lx60FpgaState, 1); memory_region_init_io(&s->iomem, NULL, &lx60_fpga_ops, s, "lx60.fpga", 0x10000); -- 2.14.2