From: Petr Menšík Date: Fri, 25 Jan 2019 20:47:37 +0000 (+0100) Subject: Do not fail on NULL passed to OpenSSL_free X-Git-Tag: v9.12.4rc1~39^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a26673a08863cdcb48ea91dd9c5e0ef4386ce931;p=thirdparty%2Fbind9.git Do not fail on NULL passed to OpenSSL_free Some plugins might call it after deconstruction. Do not crash if there is no reason for it. --- diff --git a/CHANGES b/CHANGES index a8504d88d01..7694c855c85 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +5146. [bug] Removed an unnecessary assert that could be + triggered from PKCS#11 modules during + deconstruction. [GL #841] + 5143. [bug] dnssec-keymgr and dnssec-coverage failed to find key files for zone names ending in ".". [GL #560] diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c index c9926ec6df8..1350810190e 100644 --- a/lib/dns/openssl_link.c +++ b/lib/dns/openssl_link.c @@ -163,9 +163,11 @@ mem_alloc(size_t size FLARG) { static void mem_free(void *ptr FLARG) { - INSIST(dst__memory_pool != NULL); - if (ptr != NULL) + if (ptr != NULL) { + INSIST(dst__memory_pool != NULL); + isc__mem_free(dst__memory_pool, ptr FLARG_PASS); + } } static void *