aboutsummaryrefslogtreecommitdiff
path: root/libio/iofclose.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iofclose.c')
-rw-r--r--libio/iofclose.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libio/iofclose.c b/libio/iofclose.c
index c797d86..e5cae96 100644
--- a/libio/iofclose.c
+++ b/libio/iofclose.c
@@ -35,6 +35,7 @@ _IO_fclose (fp)
CHECK_FILE(fp, EOF);
+ _IO_flockfile (fp);
if (fp->_IO_file_flags & _IO_IS_FILEBUF)
status = _IO_file_close_it (fp);
else
@@ -45,6 +46,7 @@ _IO_fclose (fp)
fp->_IO_file_flags = 0;
free(fp);
}
+ _IO_funlockfile (fp);
return status;
}