diff --git a/doc/Changelog b/doc/Changelog index 7b1dc9ad9..1b44f837d 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -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 diff --git a/libunbound/libworker.c b/libunbound/libworker.c index a886f9a88..01621927e 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -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,