summary refs log tree commit diff stats
path: root/hw/qdev.c
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2010-05-27 14:35:58 +0900
committerBlue Swirl <blauwirbel@gmail.com>2010-06-10 16:50:11 +0000
commite163ae7b8f80dc4eb38445956929409601a8321c (patch)
treea4db31e3217f9794a6f3943d2b8a39ab3b8e0abb /hw/qdev.c
parentbd418d90d0c67d7ea88420c6754a4677c09f91c1 (diff)
downloadfocaccia-qemu-e163ae7b8f80dc4eb38445956929409601a8321c.tar.gz
focaccia-qemu-e163ae7b8f80dc4eb38445956929409601a8321c.zip
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 <yamahata@valinux.co.jp>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'hw/qdev.c')
-rw-r--r--hw/qdev.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/qdev.c b/hw/qdev.c
index aa2ce0121d..36f29ea79f 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);
     }