diff options
Diffstat (limited to 'libio/getc.c')
-rw-r--r-- | libio/getc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libio/getc.c b/libio/getc.c index 89abc0dac0..82e5756ad3 100644 --- a/libio/getc.c +++ b/libio/getc.c @@ -33,14 +33,15 @@ getc (fp) { int result; CHECK_FILE (fp, EOF); + __libc_cleanup_region_start (&_IO_funlockfile, fp); _IO_flockfile (fp); result = _IO_getc_unlocked (fp); - _IO_funlockfile (fp); + __libc_cleanup_region_end (1); return result; } #ifdef _IO_MTSAFE_IO # undef getc_locked -weak_alias (getc_locked, getc) +weak_alias (getc, getc_locked) #endif |