direct-io.hg

changeset 7542:889afaf6ca25

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@xensource.com>
author emellor@leeni.uk.xensource.com
date Sun Oct 30 13:23:21 2005 +0100 (2005-10-30)
parents f994ee35da23
children 6304291cf08b
files tools/xenstat/libxenstat/src/xenstat.c
line diff
     1.1 --- a/tools/xenstat/libxenstat/src/xenstat.c	Fri Oct 28 13:02:06 2005 +0100
     1.2 +++ b/tools/xenstat/libxenstat/src/xenstat.c	Sun Oct 30 13:23:21 2005 +0100
     1.3 @@ -284,6 +284,11 @@ void xenstat_free_node(xenstat_node * no
     1.4  
     1.5  	if (node) {
     1.6  		if (node->domains) {
     1.7 +			for (i = 0; i < node->num_domains; i++) {
     1.8 +				if (node->domains[i].name)
     1.9 +					free(node->domains[i].name);
    1.10 +			}
    1.11 +
    1.12  			for (i = 0; i < NUM_COLLECTORS; i++)
    1.13  				if((node->flags & collectors[i].flag)
    1.14  				   == collectors[i].flag)