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

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



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1221214000 -3600
# Node ID 5454a1c02224b5bb5b950d35de96d4398b35c7c8
# Parent  0cdba362359249009cbaf2c13006ebe03f92bbfb
xenstore: Fix a memory leak in 'xs_is_domain_introduced'.

Signed-off-by: Konrad Rzeszutek <konrad@xxxxxxxxxxxxxxx>
xen-unstable changeset:   18469:346c073ed6a4f0debca36588039d649e2efd93c3
xen-unstable date:        Thu Sep 11 18:00:06 2008 +0100
---
 tools/xenstore/xs.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff -r 0cdba3623592 -r 5454a1c02224 tools/xenstore/xs.c
--- a/tools/xenstore/xs.c       Thu Sep 11 16:02:20 2008 +0100
+++ b/tools/xenstore/xs.c       Fri Sep 12 11:06:40 2008 +0100
@@ -741,8 +741,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®.