[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xenstore: Fix a memory leak in 'xs_is_domain_introduced'.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1221152406 -3600
# Node ID 346c073ed6a4f0debca36588039d649e2efd93c3
# Parent  a5cc38391afb16af6bdae32c5a5f4f9a3a236987
xenstore: Fix a memory leak in 'xs_is_domain_introduced'.

Signed-off-by: Konrad Rzeszutek <konrad@xxxxxxxxxxxxxxx>
---
 tools/xenstore/xs.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r a5cc38391afb -r 346c073ed6a4 tools/xenstore/xs.c
--- a/tools/xenstore/xs.c       Thu Sep 11 16:51:13 2008 +0100
+++ b/tools/xenstore/xs.c       Thu Sep 11 18:00:06 2008 +0100
@@ -795,8 +795,11 @@ char *xs_get_domain_path(struct xs_handl
 
 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 */

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.