summary refs log tree commit diff
path: root/libio/fputc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/fputc.c')
-rw-r--r--libio/fputc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libio/fputc.c b/libio/fputc.c
index 339861119f..bd871ab047 100644
--- a/libio/fputc.c
+++ b/libio/fputc.c
@@ -32,8 +32,11 @@ fputc (c, fp)
 {
   int result;
   CHECK_FILE (fp, EOF);
+  __libc_cleanup_region_start (&_IO_funlockfile, fp);
   _IO_flockfile (fp);
   result = _IO_putc_unlocked (c, fp);
-  _IO_funlockfile (fp);
+  __libc_cleanup_region_end (1);
   return result;
 }
+
+weak_alias (fputc, fputc_locked)