aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-06-13 15:34:14 +0100
committerMatt Fleming <matt.fleming@intel.com>2012-06-20 16:35:41 +0100
commit7fa16f395ab5605c7e3ba414f6ab844095aec5b4 (patch)
tree36dfc0f9a43b2368e2ae22eb8d9a2947da624881
parentf6e0c5e552ccbb17489097829116da03677a9270 (diff)
downloadsyslinux-7fa16f395ab5605c7e3ba414f6ab844095aec5b4.tar.gz
syslinux-7fa16f395ab5605c7e3ba414f6ab844095aec5b4.tar.xz
syslinux-7fa16f395ab5605c7e3ba414f6ab844095aec5b4.zip
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>
-rw-r--r--com32/elflink/ldlinux/execute.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c
index 97e51168..f713eb13 100644
--- a/com32/elflink/ldlinux/execute.c
+++ b/com32/elflink/ldlinux/execute.c
@@ -92,7 +92,6 @@ void execute(const char *cmdline, enum kernel_type type)
if (type == KT_COM32) {
/* new entry for elf format c32 */
- lfree((void *)kernel);
create_args_and_load((char *)cmdline);
} else if (type == KT_CONFIG) {
char *argv[] = { "ldlinux.c32", NULL };