From 729f74b7cf06ebd44aa8d9e3192276f47055ca13 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 1 Jun 2020 18:40:16 +0200 Subject: 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. --- libfshelp/rlock-drop-peropen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'libfshelp/rlock-drop-peropen.c') 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); -- cgit v1.2.3