hw/core/machine: fix fdt memory leak
PATCH 1/1 hw/core/machine: fix fdt memory leak
From: Marc-André Lureau <[email protected]>
The MachineState fdt field is allocated by various machine types via create_device_tree(), load_device_tree(), or similar, but was never freed in machine_finalize(). Add the missing g_free() call.
--- hw/core/machine.c | 1 + 1 file changed, 1 insertion(+)
hw/core/machine.c +1 -0
@@ -1306,6 +1306,7 @@ static void machine_finalize(Object *obj)g_free (ms->nvdimms_state);g_free (ms->numa_state);g_free (ms->audiodev); +g_free (ms->fdt); }bool machine_usb (MachineState *machine)
Signature · 1 line
2.55.0
Quoted 10 lines · On Thu, 9 Jul 2026 at 12:13, <[email protected]> wrote:
From: Marc-André Lureau <[email protected]>
The MachineState fdt field is allocated by various machine types via
create_device_tree(),load_device_tree(), or similar, but was never freed inmachine_finalize(). Add the missingg_free()call.Signed-off-by Marc-André Lureau <[email protected]>--- hw/core/machine.c | 1 +
thanks
-- PMM
Quoted 10 lines · On 9/7/26 13:12, [email protected] wrote:
From: Marc-André Lureau <[email protected]>
The MachineState fdt field is allocated by various machine types via
create_device_tree(),load_device_tree(), or similar, but was never freed inmachine_finalize(). Add the missingg_free()call.Signed-off-by Marc-André Lureau <[email protected]>--- hw/core/machine.c | 1 + 1 file changed, 1 insertion(+)
Quoted 6 lines · On Thu, Jul 09, 2026 at 03:12:49PM +0400, [email protected] wrote:
Date: Thu, 9 Jul 2026 15:12:49 +0400
From: [email protected]
Subject: [PATCH] hw/core/machine: fix fdt memory leakFrom: Marc-André Lureau <[email protected]>
Quoted 8 lines
The MachineState fdt field is allocated by various machine types via
create_device_tree(),load_device_tree(), or similar, but was never freed inmachine_finalize(). Add the missingg_free()call.Signed-off-by Marc-André Lureau <[email protected]>--- hw/core/machine.c | 1 + 1 file changed, 1 insertion(+)