qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT 34d5e94] cpu_unregister_map_client: fix memory le


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT 34d5e94] cpu_unregister_map_client: fix memory leak.
Date: Tue, 30 Jun 2009 00:57:37 -0000

From: Isaku Yamahata <address@hidden>

fix memory leak in cpu_unregister_map_client() and cpu_notify_map_clients().

Signed-off-by: Isaku Yamahata <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

diff --git a/exec.c b/exec.c
index 688f603..d6e5d3c 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);
     }
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]