diff options
author | Dag-Erling Smørgrav <des@FreeBSD.org> | 2019-06-30 14:56:56 +0000 |
---|---|---|
committer | Dag-Erling Smørgrav <des@FreeBSD.org> | 2019-06-30 14:56:56 +0000 |
commit | 4713c21a1ac91081e50e474d11fcec002b43a562 (patch) | |
tree | 3dee8846d50565e925146b25f6b761ceb1ea7b07 /libunbound/libworker.c | |
parent | 9c9d011eed674ddd7e4a0a148691887afb9e75cd (diff) |
Diffstat (limited to 'libunbound/libworker.c')
-rw-r--r-- | libunbound/libworker.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/libunbound/libworker.c b/libunbound/libworker.c index a886f9a881137..01621927eb5bb 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, |