From: Avi Kivity <[email protected]>

The buffer that is used to store the extboot filename is later overwritten
by the vga rom loading code.  Use strdup() to keep our filename.

Signed-off-by: Avi Kivity <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>

diff --git a/hw/pc.c b/hw/pc.c
index d6486a1..626450c 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -944,7 +944,7 @@ vga_bios_error:
 
     if (extboot_drive != -1) {
        snprintf(buf, sizeof(buf), "%s/%s", bios_dir, EXTBOOT_FILENAME);
-        option_rom[nb_option_roms++] = buf;
+        option_rom[nb_option_roms++] = strdup(buf);
     }
 
     {
-- 
1.6.0.6

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to