summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbcook <>2020-12-21 14:45:17 +0000
committerbcook <>2020-12-21 14:45:17 +0000
commitc8030682e0feb70b568745e3cbb734654958b44c (patch)
tree216cf5e90c65302eaeb3b2b5f0d8c28ea7cf72d7
parent3dc22e980e9538fc03b2673fe6dccee19ad5484a (diff)
downloadopenbsd-c8030682e0feb70b568745e3cbb734654958b44c.tar.gz
openbsd-c8030682e0feb70b568745e3cbb734654958b44c.tar.bz2
openbsd-c8030682e0feb70b568745e3cbb734654958b44c.zip
Destroy the mutex in a tls_config object when tls_config_free is called.
ok inoguchi@
-rw-r--r--src/lib/libtls/tls_config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_config.c b/src/lib/libtls/tls_config.c
index ed47170835..c46ebd02a9 100644
--- a/src/lib/libtls/tls_config.c
+++ b/src/lib/libtls/tls_config.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: tls_config.c,v 1.58 2020/01/20 08:39:21 jsing Exp $ */ 1/* $OpenBSD: tls_config.c,v 1.59 2020/12/21 14:45:17 bcook Exp $ */
2/* 2/*
3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> 3 * Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
4 * 4 *
@@ -179,6 +179,8 @@ tls_config_free(struct tls_config *config)
179 free((char *)config->crl_mem); 179 free((char *)config->crl_mem);
180 free(config->ecdhecurves); 180 free(config->ecdhecurves);
181 181
182 pthread_mutex_destroy(&config->mutex);
183
182 free(config); 184 free(config);
183} 185}
184 186