From: Gianni Tedesco Subject: [PATCH]: xl: don't free kernel.path string literal Date: Fri, 10 Sep 2010 15:00:11 +0100 Message-ID: <1284127211.17452.122.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Devel Cc: Ian Jackson List-Id: xen-devel@lists.xenproject.org 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 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;