aboutsummaryrefslogtreecommitdiffstats
path: root/tools/xenstore
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-09-11 18:00:06 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-09-11 18:00:06 +0100
commitb0a9e1205f87e7067be87744ed388e405777425b (patch)
treedf3845898f35f359f14369f050b06aaf0638235f /tools/xenstore
parentae79b4c5e5213f6ecaef4312a2b14eb193835ae6 (diff)
downloadxen-b0a9e1205f87e7067be87744ed388e405777425b.tar.gz
xen-b0a9e1205f87e7067be87744ed388e405777425b.tar.bz2
xen-b0a9e1205f87e7067be87744ed388e405777425b.zip
xenstore: Fix a memory leak in 'xs_is_domain_introduced'.
Signed-off-by: Konrad Rzeszutek <konrad@virtualiron.com>
Diffstat (limited to 'tools/xenstore')
-rw-r--r--tools/xenstore/xs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
index 94db1ce45e..7fef574fbd 100644
--- a/tools/xenstore/xs.c
+++ b/tools/xenstore/xs.c
@@ -795,8 +795,11 @@ char *xs_get_domain_path(struct xs_handle *h, unsigned int domid)
bool xs_is_domain_introduced(struct xs_handle *h, unsigned int domid)
{
- return strcmp("F",
- single_with_domid(h, XS_IS_DOMAIN_INTRODUCED, domid));
+ char *domain = single_with_domid(h, XS_IS_DOMAIN_INTRODUCED, domid);
+ int rc = strcmp("F", domain);
+
+ free(domain);
+ return rc;
}
/* Only useful for DEBUG versions */