summaryrefslogtreecommitdiff
path: root/drivers/bios_emulator
diff options
context:
space:
mode:
authorBin Meng <bmeng.cn@gmail.com>2015-04-24 15:48:05 +0800
committerSimon Glass <sjg@chromium.org>2015-04-29 18:51:49 -0600
commit6e7b5f22ebfd6273dcf3d9860f33590aa3fe4219 (patch)
tree78df113b54ef694cde949a12d684e5e7c8a73f0c /drivers/bios_emulator
parent81d0b354b04b7d3012f2388af3107bee14d3bf86 (diff)
downloadu-boot-imx-6e7b5f22ebfd6273dcf3d9860f33590aa3fe4219.zip
u-boot-imx-6e7b5f22ebfd6273dcf3d9860f33590aa3fe4219.tar.gz
u-boot-imx-6e7b5f22ebfd6273dcf3d9860f33590aa3fe4219.tar.bz2
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>
Diffstat (limited to 'drivers/bios_emulator')
-rw-r--r--drivers/bios_emulator/atibios.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/bios_emulator/atibios.c b/drivers/bios_emulator/atibios.c
index 7ea5fa6..dec6230 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;