mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
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>
This commit is contained in:
parent
bd418d90d0
commit
e163ae7b8f
1 changed files with 1 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue