From 3e7cde4dca8c63b8091597bd7800f0f71e822395 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Fri, 27 Jan 2023 12:31:27 +1030 Subject: [PATCH] Call bfd_close_all_done in output_file_close 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. --- gas/output-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2