1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

Destroy the mutex associated with a dirstream.

This is a followup to 187655cedb.

* libguile/filesys.c (scm_dir_free): Add call to
'scm_i_pthread_mutex_destroy'.
This commit is contained in:
Ludovic Courtès 2017-11-18 21:09:26 +01:00
parent 187655cedb
commit 2fe9a852fb

View file

@ -1841,8 +1841,14 @@ scm_dir_print (SCM exp, SCM port, scm_print_state *pstate SCM_UNUSED)
static size_t static size_t
scm_dir_free (SCM p) scm_dir_free (SCM p)
{ {
scm_i_pthread_mutex_t *mutex;
if (SCM_DIR_OPEN_P (p)) if (SCM_DIR_OPEN_P (p))
closedir ((DIR *) SCM_SMOB_DATA_1 (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; return 0;
} }
#endif #endif