projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
40f3e48
)
set bfd_error on make_tempname or make_tempdir failure
author
Alan Modra
<amodra@gmail.com>
Wed, 22 Feb 2023 01:22:46 +0000
(11:52 +1030)
committer
Alan Modra
<amodra@gmail.com>
Wed, 22 Feb 2023 01:34:07 +0000
(12:04 +1030)
* bucomm.c (make_tempname, make_tempdir): Set bfd_error on error.
binutils/bucomm.c
patch
|
blob
|
history
diff --git
a/binutils/bucomm.c
b/binutils/bucomm.c
index df60ce06547e9f169ae434bbae2a336af8188331..c268fd3d913d38ea2d8acc358c63f931ef0714df 100644
(file)
--- a/
binutils/bucomm.c
+++ b/
binutils/bucomm.c
@@
-555,6
+555,7
@@
make_tempname (const char *filename, int *ofd)
if (fd == -1)
{
free (tmpname);
+ bfd_set_error (bfd_error_system_call);
return NULL;
}
*ofd = fd;
@@
-583,7
+584,10
@@
make_tempdir (const char *filename)
#endif
#endif
if (ret == NULL)
- free (tmpname);
+ {
+ free (tmpname);
+ bfd_set_error (bfd_error_system_call);
+ }
return ret;
}