]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
dnstap io, fix for msg queue cleanup and make test.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 28 Jan 2020 11:46:08 +0000 (12:46 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 28 Jan 2020 11:46:08 +0000 (12:46 +0100)
dnstap/dtstream.c

index a62de0a637d51211078fce7f2c114c68eefefe9e..d03828123733a7ba299916af197c00970cf7b6af 100644 (file)
@@ -286,7 +286,9 @@ int dt_io_thread_register_queue(struct dt_io_thread* dtio,
 void dt_io_thread_unregister_queue(struct dt_io_thread* dtio,
         struct dt_msg_queue* mq)
 {
-       struct dt_io_list_item* item=dtio->io_list, *prev=NULL;
+       struct dt_io_list_item* item, *prev=NULL;
+       if(!dtio) return;
+       item = dtio->io_list;
        while(item) {
                if(item->queue == mq) {
                        /* found it */