Correct fseg allocation for SMBIOS tables.
authorIan Campbell <ian.campbell@citrix.com>
Tue, 14 Jun 2011 14:22:09 +0000 (15:22 +0100)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 14 Jun 2011 23:33:13 +0000 (19:33 -0400)
Anthony Perard noticed that grub was unhappy because it sees no low memory and
that his e820 table was missing the first entry. He then pointed out this
rather glaring error in the allocation of space for the SMBIOS tables.

I've no idea why I didn't see this failure.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Tested-by: Anthony Perard <anthony.perard@citrix.com>
src/biostables.c

index 761b2608f4d20f28f743738dfe84ce31aa553519..d8b50676cba732890cc4a77054f69fa78dd055cf 100644 (file)
@@ -95,7 +95,7 @@ copy_smbios(void *pos)
         return;
     if (checksum(pos+0x10, p->length-0x10) != 0)
         return;
-    struct smbios_entry_point *newpos = malloc_fseg(sizeof(p->length));
+    struct smbios_entry_point *newpos = malloc_fseg(p->length);
     if (!newpos) {
         warn_noalloc();
         return;