From 6bf0183b19b301af90199c7793e3cdf2b04826a9 Mon Sep 17 00:00:00 2001 From: Artem Boldariev Date: Fri, 8 Oct 2021 11:38:26 +0300 Subject: [PATCH] Do not call isc_tlsctx_free() on TLS listener creation failure This commit removes a superfluous call to isc_tlsctx_free() which was leading to double free() error in a case of a TLS listener creation failure. The call is superfluous because the TLS context object is supposed to be destroyed in ns_listenelt_destroy() only. --- lib/ns/interfacemgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/ns/interfacemgr.c b/lib/ns/interfacemgr.c index 72b86dc0c9..9673902b61 100644 --- a/lib/ns/interfacemgr.c +++ b/lib/ns/interfacemgr.c @@ -511,7 +511,6 @@ ns_interface_listentls(ns_interface_t *ifp, isc_tlsctx_t *sslctx) { isc_log_write(IFMGR_COMMON_LOGARGS, ISC_LOG_ERROR, "creating TLS socket: %s", isc_result_totext(result)); - isc_tlsctx_free(&sslctx); return (result); }