ia64/xen-unstable

changeset 18482:346c073ed6a4

xenstore: Fix a memory leak in 'xs_is_domain_introduced'.

Signed-off-by: Konrad Rzeszutek <konrad@virtualiron.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Sep 11 18:00:06 2008 +0100 (2008-09-11)
parents a5cc38391afb
children ec8eaab557d8 f125e481d8b6
files tools/xenstore/xs.c
line diff
     1.1 --- a/tools/xenstore/xs.c	Thu Sep 11 16:51:13 2008 +0100
     1.2 +++ b/tools/xenstore/xs.c	Thu Sep 11 18:00:06 2008 +0100
     1.3 @@ -795,8 +795,11 @@ char *xs_get_domain_path(struct xs_handl
     1.4  
     1.5  bool xs_is_domain_introduced(struct xs_handle *h, unsigned int domid)
     1.6  {
     1.7 -	return strcmp("F",
     1.8 -		      single_with_domid(h, XS_IS_DOMAIN_INTRODUCED, domid));
     1.9 +	char *domain = single_with_domid(h, XS_IS_DOMAIN_INTRODUCED, domid);
    1.10 +	int rc = strcmp("F", domain);
    1.11 +
    1.12 +	free(domain);
    1.13 +	return rc;
    1.14  }
    1.15  
    1.16  /* Only useful for DEBUG versions */