summaryrefslogtreecommitdiff
path: root/exec.c
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-06-29 14:18:06 -0500
commit34d5e948e8a0d0d3a37801a418475a8632ce0891 (patch)
treeec6b01d0bf669db3ccaeff16f759378772278438 /exec.c
parentAdd documentation for Multiboot (diff)
downloadqemu-kvm-34d5e948e8a0d0d3a37801a418475a8632ce0891.tar.gz
qemu-kvm-34d5e948e8a0d0d3a37801a418475a8632ce0891.tar.bz2
qemu-kvm-34d5e948e8a0d0d3a37801a418475a8632ce0891.zip
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>
Diffstat (limited to 'exec.c')
-rw-r--r--exec.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index 688f603c7..d6e5d3c0c 100644
--- a/exec.c
+++ b/exec.c
@@ -3281,6 +3281,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)
@@ -3290,7 +3291,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);
}
}