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;