Message ID | 20190104104749.5314-2-edgar.iglesias@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | hw/arm: versal: Fix memory leaks | expand |
On 1/4/19 11:47 AM, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com> > > Plug a couple of "board creation time" memory leaks. > Fixes 6f16da53ffe > Reported-by: Peter Maydell <peter.maydell@linaro.org> > Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> > --- > hw/arm/xlnx-versal-virt.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c > index c6feeac532..f95fde2309 100644 > --- a/hw/arm/xlnx-versal-virt.c > +++ b/hw/arm/xlnx-versal-virt.c > @@ -130,6 +130,7 @@ static void fdt_add_gic_nodes(VersalVirt *s) > 2, MM_GIC_APU_REDIST_0_SIZE); > qemu_fdt_setprop_cell(s->fdt, nodename, "#interrupt-cells", 3); > qemu_fdt_setprop_string(s->fdt, nodename, "compatible", "arm,gic-v3"); > + g_free(nodename); > } > > static void fdt_add_timer_nodes(VersalVirt *s) > @@ -364,6 +365,7 @@ static void create_virtio_regions(VersalVirt *s) > sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic_irq); > mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0); > memory_region_add_subregion(&s->soc.mr_ps, base, mr); > + g_free(name); > } > > for (i = 0; i < NUM_VIRTIO_TRANSPORT; i++) { >
diff --git a/hw/arm/xlnx-versal-virt.c b/hw/arm/xlnx-versal-virt.c index c6feeac532..f95fde2309 100644 --- a/hw/arm/xlnx-versal-virt.c +++ b/hw/arm/xlnx-versal-virt.c @@ -130,6 +130,7 @@ static void fdt_add_gic_nodes(VersalVirt *s) 2, MM_GIC_APU_REDIST_0_SIZE); qemu_fdt_setprop_cell(s->fdt, nodename, "#interrupt-cells", 3); qemu_fdt_setprop_string(s->fdt, nodename, "compatible", "arm,gic-v3"); + g_free(nodename); } static void fdt_add_timer_nodes(VersalVirt *s) @@ -364,6 +365,7 @@ static void create_virtio_regions(VersalVirt *s) sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, pic_irq); mr = sysbus_mmio_get_region(SYS_BUS_DEVICE(dev), 0); memory_region_add_subregion(&s->soc.mr_ps, base, mr); + g_free(name); } for (i = 0; i < NUM_VIRTIO_TRANSPORT; i++) {