about summary refs log tree commit diff
path: root/libio/bug-ungetwc1.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/bug-ungetwc1.c')
-rw-r--r--libio/bug-ungetwc1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/bug-ungetwc1.c b/libio/bug-ungetwc1.c
index e1623f4efd..8ed6acd175 100644
--- a/libio/bug-ungetwc1.c
+++ b/libio/bug-ungetwc1.c
@@ -36,6 +36,7 @@ do_test (void)
       printf ("cannot open temporary file: %m\n");
       return 1;
     }
+  add_temp_file (fname);
 
   setlocale(LC_ALL, "");
 
@@ -45,7 +46,6 @@ do_test (void)
       fprintf (stderr, "Cannot make `%s' file\n", fname);
       exit (EXIT_FAILURE);
     }
-  add_temp_file (fname);
 
   fprintf (fp, "%s", write_chars);
   fclose (fp);