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]: xl: don't free kernel.path string literal

To: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]: xl: don't free kernel.path string literal
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Fri, 10 Sep 2010 15:00:11 +0100
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Delivery-date: Fri, 10 Sep 2010 07:03:02 -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
Since previous patch "xl: use xlu_cfg_replace_string in a few more
places" another free of string literals bug has been exposed.

Signed-off-by: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>

diff -r 098790dd9327 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Thu Sep 09 17:59:33 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Fri Sep 10 14:57:12 2010 +0100
@@ -274,7 +274,7 @@ static void init_build_info(libxl_domain
     if (c_info->hvm) {
         b_info->shadow_memkb = 0; /* Set later */
         b_info->video_memkb = 8 * 1024;
-        b_info->kernel.path = "hvmloader";
+        b_info->kernel.path = strdup("hvmloader");
         b_info->hvm = 1;
         b_info->u.hvm.pae = 1;
         b_info->u.hvm.apic = 1;



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]: xl: don't free kernel.path string literal, Gianni Tedesco <=