diff options
author | Alan Modra <amodra@gmail.com> | 2024-02-22 07:41:46 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2024-02-22 07:57:15 +1030 |
commit | fddee222e574dfb0f2ba9ecdc4fb1b5db13bfae9 (patch) | |
tree | 77eee6b707f0eac113afd87393e44ffe86a5834f | |
parent | 23acbfee6a82cc147b04b74a89d5b34b47c150f4 (diff) | |
download | gdb-fddee222e574dfb0f2ba9ecdc4fb1b5db13bfae9.zip gdb-fddee222e574dfb0f2ba9ecdc4fb1b5db13bfae9.tar.gz gdb-fddee222e574dfb0f2ba9ecdc4fb1b5db13bfae9.tar.bz2 |
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.
-rw-r--r-- | gas/config/tc-i386.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 @@ i386_elf_section_change_hook (void) break; if (!curr) { - curr = XNEW (struct i386_segment_info); + curr = notes_alloc (sizeof (*curr)); curr->subseg = info->subseg; curr->next = NULL; prev->next = curr; |