Skip to contentSkip to conversation

: xl: don't free kernel.path string literal

PATCH New Gianni Tedesco 1 participant 1 message Sep 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : xl: don't free kernel.path string literal

Since previous patch "xl: use xlu_cfg_replace_string in a few more places" another free of string literals bug has been exposed.

tools/libxl/xl_cmdimpl.c +1 -1
diff -r 098790dd9327 tools/libxl/xl_cmdimpl.c
@@ -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;