]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix #1201: Fix missing unlock in answer_from_cache error condition.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 6 Jan 2017 15:50:39 +0000 (15:50 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 6 Jan 2017 15:50:39 +0000 (15:50 +0000)
git-svn-id: file:///svn/unbound/trunk@3983 be551aaa-1e26-0410-a405-d3ace91eadb9

daemon/worker.c
doc/Changelog

index b0c1acf93b13452bc5b1eb9ee56f8ccd6b5d6e44..6b2b4b1e3ca4dc002390a2b35b95d680887e58b4 100644 (file)
@@ -566,7 +566,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
                edns->bits &= EDNS_DO;
                if(!inplace_cb_reply_servfail_call(&worker->env, qinfo, NULL, rep,
                        LDNS_RCODE_SERVFAIL, edns, worker->scratchpad))
-                               return 0;
+                       goto bail_out;
                error_encode(repinfo->c->buffer, LDNS_RCODE_SERVFAIL, 
                        qinfo, id, flags, edns);
                rrset_array_unlock_touch(worker->env.rrset_cache, 
@@ -599,7 +599,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
        edns->bits &= EDNS_DO;
        if(!inplace_cb_reply_cache_call(&worker->env, qinfo, NULL, rep,
                (int)(flags&LDNS_RCODE_MASK), edns, worker->scratchpad))
-                       return 0;
+               goto bail_out;
        if(!reply_info_answer_encode(qinfo, rep, id, flags, 
                repinfo->c->buffer, timenow, 1, worker->scratchpad,
                udpsize, edns, (int)(edns->bits & EDNS_DO), secure)) {
index c175105169b4905b013d6345d213827302cd1f2d..4cec01bc31ea53826d9ef9ae9aaf0de29a394091 100644 (file)
@@ -1,3 +1,6 @@
+6 January 2017: Wouter
+       - Fix #1201: Fix missing unlock in answer_from_cache error condition.
+
 5 January 2017: Wouter
        - Fix to return formerr for queries for meta-types, to avoid
          packet amplification if this meta-type is sent on to upstream.