aboutsummaryrefslogtreecommitdiff
path: root/libfshelp/rlock-drop-peropen.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-01 18:40:16 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2020-06-01 18:44:34 +0200
commit729f74b7cf06ebd44aa8d9e3192276f47055ca13 (patch)
treebb39543abae6e5e4ca929f093b662228e7c31db4 /libfshelp/rlock-drop-peropen.c
parent356d52e1852c7bec071cb142352ce7b87eaac2f4 (diff)
downloadhurd-729f74b7cf06ebd44aa8d9e3192276f47055ca13.tar.gz
hurd-729f74b7cf06ebd44aa8d9e3192276f47055ca13.tar.bz2
hurd-729f74b7cf06ebd44aa8d9e3192276f47055ca13.zip
libfshelp: destroy condition variable before freeing it
To make sure that threads have really woken up. Spotted by Richard Braun. * libfshelp/rlock-drop-peropen.c (fshelp_rlock_drop_peropen): Call pthread_cond_destroy before freeing the condition variable. * libfshelp/rlock-tweak.c (fshelp_rlock_tweak): Likewise.
Diffstat (limited to 'libfshelp/rlock-drop-peropen.c')
-rw-r--r--libfshelp/rlock-drop-peropen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libfshelp/rlock-drop-peropen.c b/libfshelp/rlock-drop-peropen.c
index 91383d2f..86453dd7 100644
--- a/libfshelp/rlock-drop-peropen.c
+++ b/libfshelp/rlock-drop-peropen.c
@@ -39,6 +39,7 @@ fshelp_rlock_drop_peropen (struct rlock_peropen *po)
}
list_unlink (node, l);
+ pthread_cond_destroy(&l->wait);
t = l->po.next;
free (l);