Memory leak in process_abbrev_set
authorAlan Modra <amodra@gmail.com>
Thu, 30 Mar 2023 07:45:49 +0000 (18:15 +1030)
committerAlan Modra <amodra@gmail.com>
Sun, 2 Apr 2023 21:59:01 +0000 (07:29 +0930)
commit31991eaaeee55fbf077e5c7ed1bc5deece050933
tree758fed1761d71b37fda5bf9967714e7573fe4bbf
parentc4e37fa8e520c0e3b1e713085306d91e3fa3b78b
Memory leak in process_abbrev_set

We may have added some abbrevs to the list before hitting an error.
Free the list elements too.  free_abbrev_list returns list->next so we
need to init it earlier to avoid an uninitialised memory access.

* dwarf.c (process_abbrev_set): Call free_abbrev_list on errors.
Set list->next earlier.
binutils/dwarf.c