Leak in i386_elf_section_change_hook notes_alloc is perfect for assorted memory you can't free easily and/or would rather leave freeing until just before exit. * config/tc-i386.c (i386_elf_section_change_hook): Use notes_alloc.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index ed7c4a5..c56ca4a 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c
@@ -17627,7 +17627,7 @@ break; if (!curr) { - curr = XNEW (struct i386_segment_info); + curr = notes_alloc (sizeof (*curr)); curr->subseg = info->subseg; curr->next = NULL; prev->next = curr;