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-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xenstore: Fix a memory leak in 'xs_is_domain_introduced'.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Sep 2008 06:01:00 -0700
Delivery-date: Tue, 16 Sep 2008 06:02:38 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xenstore: Fix a memory leak in 'xs_is_domain_introduced'., Xen patchbot-unstable <=