aboutsummaryrefslogtreecommitdiff
path: root/binutils/bucomm.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/bucomm.c')
-rw-r--r--binutils/bucomm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 77afc10..9977b50 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -511,7 +511,10 @@ make_tempname (char *filename)
fd = open (tmpname, O_RDWR | O_CREAT | O_EXCL, 0600);
#endif
if (fd == -1)
- return NULL;
+ {
+ free (tmpname);
+ return NULL;
+ }
close (fd);
return tmpname;
}