From 6224164cbdf402813ec914a4858fdcf5b7c400a6 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Mon, 27 Aug 2007 03:15:14 +0000 Subject: [PATCH] 2214. [bug] Deregister OpenSSL lock callback when cleaning up. [RT #17098] --- CHANGES | 3 +++ lib/dns/openssl_link.c | 8 +++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/CHANGES b/CHANGES index 5b83fe9abe..973a2aa163 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +2214. [bug] Deregister OpenSSL lock callback when cleaning + up. [RT #17098] + 2210. [bug] Deleting class specific records via UPDATE could fail. [RT #17074] diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c index 0ca8ba9afd..92f4eb65cc 100644 --- a/lib/dns/openssl_link.c +++ b/lib/dns/openssl_link.c @@ -18,7 +18,7 @@ /* * Principal Author: Brian Wellington - * $Id: openssl_link.c,v 1.1.2.3 2006/05/23 23:51:02 marka Exp $ + * $Id: openssl_link.c,v 1.1.2.4 2007/08/27 03:15:14 marka Exp $ */ #ifdef OPENSSL @@ -141,6 +141,7 @@ dst__openssl_init() { dst__mem_free(rm); #endif cleanup_mutexinit: + CRYPTO_set_locking_callback(NULL); RUNTIME_CHECK(isc_mutexblock_destroy(locks, nlocks) == ISC_R_SUCCESS); cleanup_mutexalloc: dst__mem_free(locks); @@ -155,13 +156,14 @@ dst__openssl_destroy() { e = NULL; } #endif + if (rm != NULL) + dst__mem_free(rm); if (locks != NULL) { + CRYPTO_set_locking_callback(NULL); RUNTIME_CHECK(isc_mutexblock_destroy(locks, nlocks) == ISC_R_SUCCESS); dst__mem_free(locks); } - if (rm != NULL) - dst__mem_free(rm); } #endif /* OPENSSL */