]> 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:28:11 +0000 (11:28 +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 c1667235d1211c82faa58aba1c9071eafa545683..98071f9d732005dafe5f209ce54ef09b16d62427 100644 (file)
@@ -10128,7 +10128,7 @@ named_server_destroy(named_server_t **serverp) {
 
 static void
 fatal(named_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