Don't access NULL in dprintf

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-04 11:32:10 +02:00
parent 0cb0344d11
commit c3a4565068

View file

@ -211,10 +211,10 @@ allocate_inreg (grub_phys_addr_t paddr, grub_size_t size,
foll = (void *) ALIGN_UP (vaddr + size, GRUB_MM_ALIGN);
foll->magic = GRUB_MM_FREE_MAGIC;
foll->size = hb + hb->size - foll;
grub_dprintf ("relocator", "foll = %p, foll->size = %d\n", foll,
foll->size);
}
grub_dprintf ("relocator", "foll = %p, foll->size = %d\n", foll, foll->size);
if (vaddr - (grub_addr_t) hb >= sizeof (*hb))
{
hb->size = ((vaddr - (grub_addr_t) hb) >> GRUB_MM_ALIGN_LOG2);