]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Do not fail on NULL passed to OpenSSL_free
authorPetr Menšík <pemensik@redhat.com>
Fri, 25 Jan 2019 20:47:37 +0000 (21:47 +0100)
committerEvan Hunt <each@isc.org>
Tue, 29 Jan 2019 23:42:51 +0000 (15:42 -0800)
Some plugins might call it after deconstruction. Do not crash if there
is no reason for it.

(cherry picked from commit a26673a08863cdcb48ea91dd9c5e0ef4386ce931)

CHANGES
lib/dns/openssl_link.c

diff --git a/CHANGES b/CHANGES
index 7cadfc0164a0998cfa6af2bdaba1efaf2f66ddb4..c4a6a79fa5ea1acd19e33afb981dd35779413829 100644 (file)
--- 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]
 
index b757e2258b01666cf97881a8279246f8818b6e5f..d65ce26ee7205bbdd7006ebbf49b24c9ab82805a 100644 (file)
@@ -160,9 +160,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 *