]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_10] corrected a possible crash in isc_test_end()
authorEvan Hunt <each@isc.org>
Sun, 21 May 2017 22:44:34 +0000 (15:44 -0700)
committerEvan Hunt <each@isc.org>
Sun, 21 May 2017 22:44:34 +0000 (15:44 -0700)
(cherry picked from commit 9e44639ae07ec5c6cdd5a389333d1e0d6d29ee12)

lib/isc/tests/isctest.c

index bcf7b38c0027899fa5257f228f235c8b7c3be1e0..d0c3a19aa780250ef4961e41ca4ca09367f366dc 100644 (file)
@@ -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);
 }