Fix segv in reloc.c

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-04-22 02:43:24 +02:00
parent 4b2ec20b41
commit 97b2dc70b4

View file

@ -957,7 +957,8 @@ malloc_in_range (struct grub_relocator *rel,
ne->end = alloc_end;
ne->next = extra_blocks;
ne->prev = &extra_blocks;
extra_blocks->prev = &(ne->next);
if (extra_blocks)
extra_blocks->prev = &(ne->next);
extra_blocks = ne;
curschu->extra = ne;
}