[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/01: Destroy the mutex associated with a dirstream.
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 01/01: Destroy the mutex associated with a dirstream. |
Date: |
Sat, 18 Nov 2017 15:10:35 -0500 (EST) |
civodul pushed a commit to branch stable-2.2
in repository guile.
commit 2fe9a852fb3c6aaeef5dc9d12df3a9150eeb232a
Author: Ludovic Courtès <address@hidden>
Date: Sat Nov 18 21:09:26 2017 +0100
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(+)
diff --git a/libguile/filesys.c b/libguile/filesys.c
index d146f50..e39dc4a 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