about summary refs log tree commit diff
path: root/libio/putc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/putc.c')
-rw-r--r--libio/putc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libio/putc.c b/libio/putc.c
index 23595ab7b5..5dff3de304 100644
--- a/libio/putc.c
+++ b/libio/putc.c
@@ -28,14 +28,15 @@ putc (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;
 }
 
 #ifdef _IO_MTSAFE_IO
 # undef putc_locked
 
-weak_alias (putc_locked, putc)
+weak_alias (putc, putc_locked)
 #endif