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,6 +957,7 @@ malloc_in_range (struct grub_relocator *rel,
ne->end = alloc_end; ne->end = alloc_end;
ne->next = extra_blocks; ne->next = extra_blocks;
ne->prev = &extra_blocks; ne->prev = &extra_blocks;
if (extra_blocks)
extra_blocks->prev = &(ne->next); extra_blocks->prev = &(ne->next);
extra_blocks = ne; extra_blocks = ne;
curschu->extra = ne; curschu->extra = ne;