From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1062) id F160A3858433; Fri, 27 Jan 2023 07:02:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F160A3858433 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Alan Modra To: bfd-cvs@sourceware.org Subject: [binutils-gdb] Call bfd_close_all_done in output_file_close X-Act-Checkin: binutils-gdb X-Git-Author: Alan Modra X-Git-Refname: refs/heads/master X-Git-Oldrev: c026360c7578b4599c289987981d9c9c80481e40 X-Git-Newrev: 3e7cde4dca8c63b8091597bd7800f0f71e822395 Message-Id: <20230127070253.F160A3858433@sourceware.org> Date: Fri, 27 Jan 2023 07:02:53 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jan 2023 07:02:54 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D3e7cde4dca8c= 63b8091597bd7800f0f71e822395 commit 3e7cde4dca8c63b8091597bd7800f0f71e822395 Author: Alan Modra Date: Fri Jan 27 12:31:27 2023 +1030 Call bfd_close_all_done in output_file_close =20 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. =20 PR 13056 * output-file.c (output_file_close): Call bfd_close_all_done, not bfd_cache_close_all. Diff: --- 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) =20 /* Close the bfd. */ if (!flag_always_generate_output && had_errors ()) - res =3D bfd_cache_close_all (); + res =3D bfd_close_all_done (obfd); else res =3D bfd_close (obfd); now_seg =3D NULL;