summary refs log tree commit diff
path: root/libio/genops.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/genops.c')
-rw-r--r--libio/genops.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libio/genops.c b/libio/genops.c
index 23a6fdeaea..e5bff7afed 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -465,6 +465,9 @@ DEFUN(_IO_init, (fp, flags),
   fp->_IO_save_end = NULL;
   fp->_markers = NULL;
   fp->_cur_column = 0;
+#ifdef _IO_MTSAFE_IO
+  _IO_mutex_init (fp->_lock);
+#endif
 }
 
 int
@@ -497,6 +500,10 @@ DEFUN(_IO_default_finish, (fp),
       fp->_IO_save_base = NULL;
     }
 
+#ifdef _IO_MTSAFE_IO
+  _IO_mutex_destroy (fp->_lock);
+#endif
+  
   _IO_un_link(fp);
 }