diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-11-18 21:09:26 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-11-18 21:09:26 +0100 |
commit | 2fe9a852fb3c6aaeef5dc9d12df3a9150eeb232a (patch) | |
tree | be3454b245045030142e9bc4130a019524ca213d /libguile/filesys.c | |
parent | 187655cedb42cc4b01088179649b02295cd35260 (diff) | |
download | guile-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.c | 6 |
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 |