Fix an aout memory leak

Message ID Y7f7lGQlMvLz157a@squeak.grove.modra.org
State Repeat Merge
Headers
Series Fix an aout memory leak |

Checks

Context Check Description
snail/binutils-gdb-check warning Git am fail log

Commit Message

Alan Modra Jan. 6, 2023, 10:44 a.m. UTC
  * aoutx.h (aout_bfd_free_cached_info): Free line_buf.
  

Patch

diff --git a/bfd/aoutx.h b/bfd/aoutx.h
index ae3e917c880..6d6527640fe 100644
--- a/bfd/aoutx.h
+++ b/bfd/aoutx.h
@@ -2909,6 +2909,7 @@  NAME (aout, bfd_free_cached_info) (bfd *abfd)
     return true;
 
 #define BFCI_FREE(x) do { free (x); x = NULL; } while (0)
+  BFCI_FREE (adata (abfd).line_buf);
   BFCI_FREE (obj_aout_symbols (abfd));
 #ifdef USE_MMAP
   obj_aout_external_syms (abfd) = 0;