From 7cc666abf148fbd7ba9d076f4e5e325cfca09bbc Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Sun, 21 May 2017 15:44:39 -0700 Subject: [PATCH] [v9_9] corrected a possible crash in isc_test_end() (cherry picked from commit 9e44639ae07ec5c6cdd5a389333d1e0d6d29ee12) --- lib/isc/tests/isctest.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/isc/tests/isctest.c b/lib/isc/tests/isctest.c index ca62d4dab3..8c673fdc81 100644 --- a/lib/isc/tests/isctest.c +++ b/lib/isc/tests/isctest.c @@ -148,8 +148,6 @@ isc_test_end(void) { isc_task_detach(&maintask); if (taskmgr != NULL) isc_taskmgr_destroy(&taskmgr); - if (lctx != NULL) - isc_log_destroy(&lctx); if (hash_active) { isc_hash_destroy(); hash_active = ISC_FALSE; @@ -159,6 +157,8 @@ isc_test_end(void) { cleanup_managers(); + if (lctx != NULL) + isc_log_destroy(&lctx); if (mctx != NULL) isc_mem_destroy(&mctx); }