提交 34d5e948 编写于 作者: I Isaku Yamahata 提交者: Anthony Liguori

cpu_unregister_map_client: fix memory leak.

fix memory leak in cpu_unregister_map_client() and cpu_notify_map_clients().
Signed-off-by: NIsaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 7677f05d
......@@ -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);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册