From 31b677b35f9f3f2789e71329d92b0fc6cbbe23ed Mon Sep 17 00:00:00 2001 From: Wouter Wijngaards Date: Tue, 29 Jan 2019 16:07:07 +0000 Subject: [PATCH] - Fix locking for libunbound context setup with broken port config. git-svn-id: file:///svn/unbound/trunk@5088 be551aaa-1e26-0410-a405-d3ace91eadb9 --- doc/Changelog | 1 + libunbound/libworker.c | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) 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,