Commit 65f9103c authored by Bob Halley's avatar Bob Halley
Browse files

destroy routine now does nothing if init failed

parent edee9a8a
......@@ -16,7 +16,7 @@
*/
/*
* $Id: tkey.c,v 1.13 1999/11/05 16:53:47 bwelling Exp $
* $Id: tkey.c,v 1.14 1999/11/05 20:19:24 halley Exp $
* Principal Author: Brian Wellington
*/
......@@ -125,7 +125,8 @@ dns_tkey_init(isc_log_t *lctx, dns_c_ctx_t *cfg, isc_mem_t *mctx) {
void
dns_tkey_destroy(void) {
REQUIRE(tkey_mctx != NULL);
if (tkey_mctx == NULL)
return;
if (tkey_dhkey != NULL)
dst_key_free(tkey_dhkey);
if (tkey_domain != NULL)
......
......@@ -16,7 +16,7 @@
*/
/*
* $Id: tsig.c,v 1.31 1999/11/03 16:52:28 bwelling Exp $
* $Id: tsig.c,v 1.32 1999/11/05 20:19:24 halley Exp $
* Principal Author: Brian Wellington
*/
......@@ -1102,6 +1102,8 @@ dns_tsig_init(isc_log_t *lctx, dns_c_ctx_t *confctx, isc_mem_t *mctx) {
void
dns_tsig_destroy() {
if (tsig_mctx == NULL)
return;
while (!ISC_LIST_EMPTY(tsigkeys)) {
dns_tsigkey_t *key = ISC_LIST_HEAD(tsigkeys);
key->refs = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment