]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #1331: libunbound segfault in threaded mode when context is
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 3 Jul 2017 11:41:32 +0000 (11:41 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 3 Jul 2017 11:41:32 +0000 (11:41 +0000)
  deleted.

git-svn-id: file:///svn/unbound/trunk@4258 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
libunbound/libworker.c

index 4ea9856b0146f1647be9de5f45e9cf70bd414d89..d8db3cde22373a79070da348537db6285fbafb10 100644 (file)
@@ -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.
index b42ba0bd8e78222d526c7dabb5e22d7fd9c9c93c..a23015a78fb024f74641fb71e4bdb1135bc94cf2 100644 (file)
@@ -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;