WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [qemu-xen-unstable] cpu_unregister_map_client: fix memor

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] cpu_unregister_map_client: fix memory leak
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 30 Jun 2009 07:35:05 -0700
Delivery-date: Tue, 30 Jun 2009 07:35:10 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit b471f03d51cde3976b6d52179ca2a86d8906a587
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Tue Jun 30 15:22:14 2009 +0100

    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@xxxxxxxxxxxxx>
    
    [ Picked out of qemu-devel submission for exec.c, because we have a
      clone-and-hack of the cpu_*map* code :-( -iwj ]
---
 i386-dm/exec-dm.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/i386-dm/exec-dm.c b/i386-dm/exec-dm.c
index 45fc8e5..b8af55a 100644
--- a/i386-dm/exec-dm.c
+++ b/i386-dm/exec-dm.c
@@ -776,6 +776,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)
@@ -785,7 +786,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);
     }
 }
 
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] cpu_unregister_map_client: fix memory leak, Ian Jackson <=