From 2fe9a852fb3c6aaeef5dc9d12df3a9150eeb232a Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 18 Nov 2017 21:09:26 +0100 Subject: 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'. --- libguile/filesys.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libguile/filesys.c') 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 -- cgit v1.2.3