[syslinux:elflink] ldlinux: Don't lfree() 'kernel' twice
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Tue Jun 26 09:54:09 PDT 2012
Commit-ID: 7fa16f395ab5605c7e3ba414f6ab844095aec5b4
Gitweb: http://www.syslinux.org/commit/7fa16f395ab5605c7e3ba414f6ab844095aec5b4
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Wed, 13 Jun 2012 15:34:14 +0100
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Wed, 20 Jun 2012 16:35:41 +0100
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 at intel.com>
---
com32/elflink/ldlinux/execute.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/com32/elflink/ldlinux/execute.c b/com32/elflink/ldlinux/execute.c
index 97e5116..f713eb1 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 };
More information about the Syslinux-commits
mailing list