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] Free domain names in xenstat_free_node, fixing small mem

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Free domain names in xenstat_free_node, fixing small memory leak.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Oct 2005 22:34:06 +0000
Delivery-date: Sun, 30 Oct 2005 22:31:46 +0000
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 889afaf6ca258d82ac74993fb1def75c88186b61
# Parent  f994ee35da2350ed76c6bf732d267ac6c90a4dd5
Free domain names in xenstat_free_node, fixing small memory leak.

Thanks to Anthony Liguori for spotting the leak.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r f994ee35da23 -r 889afaf6ca25 tools/xenstat/libxenstat/src/xenstat.c
--- a/tools/xenstat/libxenstat/src/xenstat.c    Fri Oct 28 12:02:06 2005
+++ b/tools/xenstat/libxenstat/src/xenstat.c    Sun Oct 30 12:23:21 2005
@@ -284,6 +284,11 @@
 
        if (node) {
                if (node->domains) {
+                       for (i = 0; i < node->num_domains; i++) {
+                               if (node->domains[i].name)
+                                       free(node->domains[i].name);
+                       }
+
                        for (i = 0; i < NUM_COLLECTORS; i++)
                                if((node->flags & collectors[i].flag)
                                   == collectors[i].flag)

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Free domain names in xenstat_free_node, fixing small memory leak., Xen patchbot -unstable <=