From e163ae7b8f80dc4eb38445956929409601a8321c Mon Sep 17 00:00:00 2001 From: Isaku Yamahata Date: Thu, 27 May 2010 14:35:58 +0900 Subject: qbus: fix memory leak in qbus_free() BusState::name is allocated in qbus_create_inplace(). So it should be freed by qbus_free(). Signed-off-by: Isaku Yamahata Signed-off-by: Blue Swirl --- hw/qdev.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/qdev.c') diff --git a/hw/qdev.c b/hw/qdev.c index aa2ce01..36f29ea 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -700,6 +700,7 @@ void qbus_free(BusState *bus) QLIST_REMOVE(bus, sibling); bus->parent->num_child_bus--; } + qemu_free((void*)bus->name); if (bus->qdev_allocated) { qemu_free(bus); } -- cgit v1.1