aboutsummaryrefslogtreecommitdiff
path: root/libio/ioungetc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/ioungetc.c')
-rw-r--r--libio/ioungetc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libio/ioungetc.c b/libio/ioungetc.c
index c1237b5..cc41408 100644
--- a/libio/ioungetc.c
+++ b/libio/ioungetc.c
@@ -33,9 +33,10 @@ _IO_ungetc (c, fp)
CHECK_FILE (fp, EOF);
if (c == EOF)
return EOF;
+ __libc_cleanup_region_start (&_IO_funlockfile, fp);
_IO_flockfile (fp);
result = _IO_sputbackc (fp, (unsigned char) c);
- _IO_funlockfile (fp);
+ __libc_cleanup_region_end (1);
return result;
}