From: Artem Boldariev Date: Fri, 8 Oct 2021 08:38:26 +0000 (+0300) Subject: Do not call isc_tlsctx_free() on TLS listener creation failure X-Git-Tag: v9.17.20~51^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6bf0183b19b301af90199c7793e3cdf2b04826a9;p=thirdparty%2Fbind9.git 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. --- diff --git a/lib/ns/interfacemgr.c b/lib/ns/interfacemgr.c index 72b86dc0c9f..9673902b61e 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); }