* [binutils-gdb] set bfd_error on make_tempname or make_tempdir failure
@ 2023-02-22 1:35 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-02-22 1:35 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5e39600a691e3ba76acf6ab94edb24844c2e82b7
commit 5e39600a691e3ba76acf6ab94edb24844c2e82b7
Author: Alan Modra <amodra@gmail.com>
Date: Wed Feb 22 11:52:46 2023 +1030
set bfd_error on make_tempname or make_tempdir failure
* bucomm.c (make_tempname, make_tempdir): Set bfd_error on error.
Diff:
---
binutils/bucomm.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index df60ce06547..c268fd3d913 100644
--- 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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-02-22 1:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-22 1:35 [binutils-gdb] set bfd_error on make_tempname or make_tempdir failure 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).