]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - binutils/objcopy.c
PR31191, objcopy leaves temporary files
authorAlan Modra <amodra@gmail.com>
Tue, 26 Dec 2023 05:50:34 +0000 (16:20 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 27 Dec 2023 06:04:39 +0000 (16:34 +1030)
commit145c21056abeace6b3f6cafb65c29a7812036852
tree113d031f9286d19fa933551d3a5785301427e530
parenta70dcdebbd5a6822293d893fd40a2129ee621148
PR31191, objcopy leaves temporary files

Fix the ENOTDIR rmdir too.

PR 31191
* objcopy.c (copy_archive): Localise uses of "l".  Remove
const from name_list.name.  Unlink output element on bfd_close
error, and NULL list->name to indicate file is removed.  Adjust
cleanup to prevent rmdir on non-existent file.
binutils/objcopy.c