From: Bin Meng Date: Fri, 24 Apr 2015 07:48:05 +0000 (+0800) Subject: biosemu: Do not free vga_info->BIOSImage when it is 0xc0000 X-Git-Tag: v2015.07-rc1~44 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=6e7b5f22ebfd6273dcf3d9860f33590aa3fe4219;p=u-boot 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 Acked-by: Simon Glass --- diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c index 7ea5fa6224..dec6230ad5 100644 --- a/drivers/bios_emulator/atibios.c +++ b/drivers/bios_emulator/atibios.c @@ -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;