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] potential memory leak

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] potential memory leak
From: Kouya SHIMURA <kouya@xxxxxxxxxxxxxx>
Date: Thu, 12 Oct 2006 12:31:44 +0900
Delivery-date: Wed, 11 Oct 2006 20:32:24 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

Here is a trivial patch to avoid potential memory leak.

Thanks,
Kouya

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r f7d65fb7299b xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Tue Oct 10 22:04:01 2006 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Thu Oct 12 12:22:05 2006 +0900
@@ -653,6 +653,7 @@ int hvm_bringup_ap(int vcpuid, int tramp
     if ( rc != 0 )
     {
         DPRINTK("AP %d bringup failed in boot_vcpu %x.\n", vcpuid, rc);
+        xfree(ctxt);
         return rc;
     }
 
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>