public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Call bfd_close_all_done in output_file_close
@ 2023-01-27  7:01 Alan Modra
  0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-01-27  7:01 UTC (permalink / raw)
  To: binutils

bfd_cache_close_all is good for closing file descriptors, but doesn't
do the cleanup of bfd memory as in bfd_close_all_done.

	PR 13056
	* output-file.c (output_file_close): Call bfd_close_all_done,
	not bfd_cache_close_all.

diff --git a/gas/output-file.c b/gas/output-file.c
index 4c97e8f1a9b..88f40116513 100644
--- a/gas/output-file.c
+++ b/gas/output-file.c
@@ -96,7 +96,7 @@ output_file_close (void)
 
   /* Close the bfd.  */
   if (!flag_always_generate_output && had_errors ())
-    res = bfd_cache_close_all ();
+    res = bfd_close_all_done (obfd);
   else
     res = bfd_close (obfd);
   now_seg = NULL;

-- 
Alan Modra
Australia Development Lab, IBM

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-27  7:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-27  7:01 Call bfd_close_all_done in output_file_close Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).