From c3a4565068d248737de7a5cc0d159cef8181732f Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 4 May 2010 11:32:10 +0200 Subject: [PATCH] Don't access NULL in dprintf --- lib/relocator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/relocator.c b/lib/relocator.c index 5772ccc7d..c30177591 100644 --- a/lib/relocator.c +++ b/lib/relocator.c @@ -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);