]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Move goto label in answer_from_cache to the end of the function
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 3 Apr 2019 05:32:28 +0000 (05:32 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 3 Apr 2019 05:32:28 +0000 (05:32 +0000)
  where it is more visible.

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

daemon/worker.c
doc/Changelog

index 433b96fd527a0662caaf51a2da150036bfbf5641..fc93817a040c9608c980a55a700e6393402bc5aa 100644 (file)
@@ -660,10 +660,7 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
                if(!reply_check_cname_chain(qinfo, rep)) {
                        /* cname chain invalid, redo iterator steps */
                        verbose(VERB_ALGO, "Cache reply: cname chain broken");
-               bail_out:
-                       rrset_array_unlock_touch(worker->env.rrset_cache, 
-                               worker->scratchpad, rep->ref, rep->rrset_count);
-                       return 0;
+                       goto bail_out;
                }
        }
        /* check security status of the cached answer */
@@ -758,6 +755,11 @@ answer_from_cache(struct worker* worker, struct query_info* qinfo,
        }
        /* go and return this buffer to the client */
        return 1;
+
+bail_out:
+       rrset_array_unlock_touch(worker->env.rrset_cache, 
+               worker->scratchpad, rep->ref, rep->rrset_count);
+       return 0;
 }
 
 /** Reply to client and perform prefetch to keep cache up to date.
index cabc5397031181ad594a43dc347e63ef83f5b702..c5ab7502b866e13abb77d6d3adfe97a82ef0ea23 100644 (file)
@@ -1,3 +1,7 @@
+3 April 2019: Wouter
+       - Move goto label in answer_from_cache to the end of the function
+         where it is more visible.
+
 2 April 2019: Wouter
        - Fix auth-zone NSEC3 response for empty nonterminals with exact
          match nsec3 records.