set bfd_error on make_tempname or make_tempdir failure

	* bucomm.c (make_tempname, make_tempdir): Set bfd_error on error.
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index df60ce0..c268fd3 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -555,6 +555,7 @@
   if (fd == -1)
     {
       free (tmpname);
+      bfd_set_error (bfd_error_system_call);
       return NULL;
     }
   *ofd = fd;
@@ -583,7 +584,10 @@
 #endif
 #endif
   if (ret == NULL)
-    free (tmpname);
+    {
+      free (tmpname);
+      bfd_set_error (bfd_error_system_call);
+    }
   return ret;
 }