Re: Subject: [PATCH] bfd: avoid double free in _bfd_stab_section_find_nearest_line on the out-of-memory path

Alan Modra <[email protected]>
Newsgroups gmane.comp.gnu.binutils
Message-ID <[email protected]>
On Fri, Aug 28, 2026 at 01:33:55AM +0800, [email protected] wrote:
> Hello binutils maintainers,
> 
> This is a robustness fix for a double free in
> _bfd_stab_section_find_nearest_line (bfd/syms.c): the normal path
> frees reloc_vector without clearing the pointer, so the OOM error path
> (goto out3) frees it a second time. Full details and reproduction
> material are on bug #34573.

Thanks for the bug report and patch.  I have applied it, along with
correcting the goto.

-- 
Alan Modra
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.