about summary refs log tree commit diff
path: root/libio/iofputs.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iofputs.c')
-rw-r--r--libio/iofputs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libio/iofputs.c b/libio/iofputs.c
index 3359515ac8..a9fd5f29a3 100644
--- a/libio/iofputs.c
+++ b/libio/iofputs.c
@@ -33,12 +33,13 @@ _IO_fputs (str, fp)
   _IO_size_t len = strlen (str);
   int result;
   CHECK_FILE (fp, EOF);
+  __libc_cleanup_region_start (&_IO_funlockfile, fp);
   _IO_flockfile (fp);
   if (_IO_sputn (fp, str, len) != len)
     result = EOF;
   else
     result = 1;
-  _IO_funlockfile (fp);
+  __libc_cleanup_region_end (1);
   return result;
 }