summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIsaku Yamahata <yamahata@valinux.co.jp>2009-06-26 18:57:18 +0900
committerAnthony Liguori <aliguori@us.ibm.com>2009-07-10 17:15:03 -0500
commit259cf68eb197a49c90810b2874a18fb99d36447a (patch)
tree2804b4cad27540fc544476123ee41c3a8b0b815f
parent41de90f32c39cb1da68f78815aac2021ae868d9b (diff)
downloadqemu-259cf68eb197a49c90810b2874a18fb99d36447a.tar.gz
cpu_unregister_map_client: fix memory leak.
fix memory leak in cpu_unregister_map_client() and cpu_notify_map_clients(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r--exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 61a55325ef..9bd84b46b6 100644
--- a/exec.c
+++ b/exec.c
@@ -3110,6 +3110,7 @@ void cpu_unregister_map_client(void *_client)
MapClient *client = (MapClient *)_client;
LIST_REMOVE(client, link);
+ qemu_free(client);
}
static void cpu_notify_map_clients(void)
@@ -3119,7 +3120,7 @@ static void cpu_notify_map_clients(void)
while (!LIST_EMPTY(&map_client_list)) {
client = LIST_FIRST(&map_client_list);
client->callback(client->opaque);
- LIST_REMOVE(client, link);
+ cpu_unregister_map_client(client);
}
}