biosemu: Do not free vga_info->BIOSImage when it is 0xc0000

For x86, vga_info->BIOSImage points to 0xc0000 which cannot be freed.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Bin Meng 2015-04-24 15:48:05 +08:00 committed by Simon Glass
parent 81d0b354b0
commit 6e7b5f22eb

View File

@ -502,7 +502,8 @@ int biosemu_run(pci_dev_t pcidev, uchar *bios_rom, int bios_len,
*/
if (clean_up) {
BE_exit();
if (vga_info->BIOSImage)
if (vga_info->BIOSImage &&
(u32)(vga_info->BIOSImage) != 0xc0000)
free(vga_info->BIOSImage);
free(vga_info);
vga_info = NULL;