ldlinux: Don't lfree() 'kernel' twice
This lead to serious problems where duplicate free blocks would appear
next to each other on the free list, which created an infinite loop in
the following code,
for ( fp = head->next_free ; fp != head ; fp = fp->next_free ) {
if ( ARENA_SIZE_GET(fp->a.attrs) >= size ) {
/* Found fit -- allocate out of this block */
p = __malloc_from_block(fp, size, tag);
break;
}
}
because fp == fp->next_free, resulting in modules hanging forever at
malloc() call sites.
Signed-off-by: Matt Fleming <matt.fleming@intel.com>