qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qbus: fix memory leak in qbus_free()
@ 2010-05-27  5:35 Isaku Yamahata
  2010-06-02 15:01 ` Markus Armbruster
  2010-06-10 18:17 ` Blue Swirl
  0 siblings, 2 replies; 5+ messages in thread
From: Isaku Yamahata @ 2010-05-27  5:35 UTC (permalink / raw)
  To: qemu-devel

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>
---
 hw/qdev.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/hw/qdev.c b/hw/qdev.c
index af17486..2845af5 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);
     }
-- 
1.6.6.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-10 18:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-27  5:35 [Qemu-devel] [PATCH] qbus: fix memory leak in qbus_free() Isaku Yamahata
2010-06-02 15:01 ` Markus Armbruster
2010-06-03  0:59   ` Isaku Yamahata
2010-06-03  7:05     ` Markus Armbruster
2010-06-10 18:17 ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).