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 01/17] xenpaging: close xch handle in xenpaging_init

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 01/17] xenpaging: close xch handle in xenpaging_init error path
From: Olaf Hering <olaf@xxxxxxxxx>
Date: Mon, 06 Dec 2010 21:59:08 +0100
Delivery-date: Mon, 06 Dec 2010 13:05:26 -0800
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1291669155; l=524; s=domk; d=aepfle.de; h=References:Subject:To:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=/Ql3xKeqwPTEAkgNjsOkYe0iQ84=; b=dgBfWhRRBsIKRbC2ls4gISZgffqOr4bOcrDAcr0uWfV32K8arJDxiWEXT+INWkhzc/S i/UZQ8YOxeM7zfHRTSs9K7PxD5QG9QzszS7FeICdxfria0HLA8jdz9guLI8eU5Z/IiRD/ gn7GduypO4tfBmsCib7WUAJIWOelDC6klJc=
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>
References: <20101206205907.848643876@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.48-4.4
Just for correctness, close the xch handle in the error path.

Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>

---
 tools/xenpaging/xenpaging.c |    1 +
 1 file changed, 1 insertion(+)

--- xen-unstable.hg-4.1.22459.orig/tools/xenpaging/xenpaging.c
+++ xen-unstable.hg-4.1.22459/tools/xenpaging/xenpaging.c
@@ -224,6 +224,7 @@ xenpaging_t *xenpaging_init(xc_interface
  err:
     if ( paging )
     {
+        xc_interface_close(xch);
         if ( paging->mem_event.shared_page )
         {
             munlock(paging->mem_event.shared_page, PAGE_SIZE);


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