summaryrefslogtreecommitdiff
path: root/libguile/filesys.c
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-11-18 21:09:26 +0100
committerLudovic Courtès <ludo@gnu.org>2017-11-18 21:09:26 +0100
commit2fe9a852fb3c6aaeef5dc9d12df3a9150eeb232a (patch)
treebe3454b245045030142e9bc4130a019524ca213d /libguile/filesys.c
parent187655cedb42cc4b01088179649b02295cd35260 (diff)
downloadguile-2fe9a852fb3c6aaeef5dc9d12df3a9150eeb232a.tar.gz
Destroy the mutex associated with a dirstream.
This is a followup to 187655cedb42cc4b01088179649b02295cd35260. * libguile/filesys.c (scm_dir_free): Add call to 'scm_i_pthread_mutex_destroy'.
Diffstat (limited to 'libguile/filesys.c')
-rw-r--r--libguile/filesys.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libguile/filesys.c b/libguile/filesys.c
index d146f50ef..e39dc4a0d 100644
--- a/libguile/filesys.c
+++ b/libguile/filesys.c
@@ -1841,8 +1841,14 @@ scm_dir_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
static size_t
scm_dir_free (SCM p)
{
+ scm_i_pthread_mutex_t *mutex;
+
if (SCM_DIR_OPEN_P (p))
closedir ((DIR *) SCM_SMOB_DATA_1 (p));
+
+ mutex = (scm_i_pthread_mutex_t *) SCM_SMOB_DATA_2 (p);
+ scm_i_pthread_mutex_destroy (mutex);
+
return 0;
}
#endif