WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix memory leak in xs_is_domain_introduced

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] Fix memory leak in xs_is_domain_introduced
From: Konrad Rzeszutek <konrad@xxxxxxxxxxxxxxx>
Date: Thu, 11 Sep 2008 12:49:29 -0400
Delivery-date: Thu, 11 Sep 2008 09:52:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
Fixes a memory leak in 'xs_is_domain_introduced'.

Signed-off-by: Konrad Rzeszutek <konrad@xxxxxxxxxxxxxxx>

 xs.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff -r dbac9ee4d761 tools/xenstore/xs.c
--- a/tools/xenstore/xs.c       Mon Sep 08 16:02:13 2008 +0100
+++ b/tools/xenstore/xs.c       Thu Sep 11 11:52:45 2008 -0400
@@ -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-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] Fix memory leak in xs_is_domain_introduced, Konrad Rzeszutek <=