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] libxl: do not call libxl__file_reference_unmap two t

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] libxl: do not call libxl__file_reference_unmap two times
From: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Date: Fri, 11 Feb 2011 13:46:02 +0000
Delivery-date: Fri, 11 Feb 2011 05:46:37 -0800
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: Alpine 2.00 (DEB 1167 2008-08-23)
Fix double free due to libxl__file_reference_unmap(&info->kernel) called
multiple times: first at the end of libxl__domain_build and then in
libxl_domain_build_info_destroy.

Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>

diff -r 19b2424be183 tools/libxl/libxl_create.c
--- a/tools/libxl/libxl_create.c        Thu Feb 10 09:02:50 2011 +0000
+++ b/tools/libxl/libxl_create.c        Fri Feb 11 13:43:34 2011 +0000
@@ -196,9 +196,6 @@ int libxl__domain_build(libxl_ctx *ctx, 
     }
     ret = libxl__build_post(ctx, domid, info, state, vments, localents);
 out:
-    libxl__file_reference_unmap(&info->kernel);
-    if (!info->hvm)
-           libxl__file_reference_unmap(&info->u.pv.ramdisk);
 
     libxl__free_all(&gc);
     return ret;

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

<Prev in Thread] Current Thread [Next in Thread>