]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix locking for libunbound context setup with broken port config.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 29 Jan 2019 16:07:07 +0000 (16:07 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 29 Jan 2019 16:07:07 +0000 (16:07 +0000)
git-svn-id: file:///svn/unbound/trunk@5088 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
libunbound/libworker.c

index 7b1dc9ad9ebc4f6bd6cff29c8b7898436851fa59..1b44f837d7714252b7c7e611df6acaa4439b5475 100644 (file)
@@ -1,6 +1,7 @@
 29 January 2019: Wouter
        - Fix spelling of tls-ciphers in example.conf.in.
        - Fix #4224: auth_xfr_notify.rpl test broken due to typo
+       - Fix locking for libunbound context setup with broken port config.
 
 28 January 2019: Wouter
        - ub_ctx_set_tls call for libunbound that enables DoT for the machines
index a886f9a8811370d788ee0d8b4ff1fc6b09749cd2..01621927eb5bbd86a035914b75515927ea1395ab 100644 (file)
@@ -222,11 +222,10 @@ libworker_setup(struct ub_ctx* ctx, int is_bg, struct ub_event_base* eb)
        }
        numports = cfg_condense_ports(cfg, &ports);
        if(numports == 0) {
-               int locked = !w->is_bg || w->is_bg_thread;
-               libworker_delete(w);
-               if(locked) {
+               if(!w->is_bg || w->is_bg_thread) {
                        lock_basic_unlock(&ctx->cfglock);
                }
+               libworker_delete(w);
                return NULL;
        }
        w->back = outside_network_create(w->base, cfg->msg_buffer_size,