From: Wouter Wijngaards Date: Mon, 3 Jul 2017 11:41:32 +0000 (+0000) Subject: - Fix #1331: libunbound segfault in threaded mode when context is X-Git-Tag: release-1.6.6rc1~73 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7e8e85459c1183a9b21ac7840ff297fe4dffe0d9;p=thirdparty%2Funbound.git - Fix #1331: libunbound segfault in threaded mode when context is deleted. git-svn-id: file:///svn/unbound/trunk@4258 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 4ea9856b0..d8db3cde2 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,6 +1,8 @@ 3 July 2017: Wouter - Fix for unbound-checkconf, check ipsecmod-hook if ipsecmod is turned on. + - Fix #1331: libunbound segfault in threaded mode when context is + deleted. 29 June 2017: Wouter - Fix python example0 return module wait instead of error for pass. diff --git a/libunbound/libworker.c b/libunbound/libworker.c index b42ba0bd8..a23015a78 100644 --- a/libunbound/libworker.c +++ b/libunbound/libworker.c @@ -749,7 +749,7 @@ libworker_bg_done_cb(void* arg, int rcode, sldns_buffer* buf, enum sec_status s, { struct ctx_query* q = (struct ctx_query*)arg; - if(q->cancelled) { + if(q->cancelled || q->w->back->want_to_quit) { if(q->w->is_bg_thread) { /* delete it now */ struct ub_ctx* ctx = q->w->ctx;