]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Prevent crash on dst initialization failure
authorPetr Menšík <pemensik@redhat.com>
Wed, 22 Jul 2020 16:55:02 +0000 (18:55 +0200)
committerMark Andrews <marka@isc.org>
Thu, 23 Jul 2020 01:29:57 +0000 (11:29 +1000)
server might be created, but not yet fully initialized, when fatal
function is called. Check both server and task before attaching
exclusive task.

(cherry picked from commit c5e7152cf04f75d0fe00163f076f4cc3cafce259)

bin/named/server.c

index e752aa71a99fc382d97f6b4c1d70aada574fed3b..9739206ae77d66879082a187106573d2a1d914ec 100644 (file)
@@ -9299,7 +9299,7 @@ ns_server_destroy(ns_server_t **serverp) {
 
 static void
 fatal(ns_server_t *server, const char *msg, isc_result_t result) {
-       if (server != NULL) {
+       if (server != NULL && server->task != NULL) {
                /*
                 * Prevent races between the OpenSSL on_exit registered
                 * function and any other OpenSSL calls from other tasks