summaryrefslogtreecommitdiffstats
path: root/bind97-rh507429.patch
blob: 30e516914af296acdde842766667eac879b6536c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
diff -up bind-9.7.0-P1/lib/dns/resolver.c.rh507429 bind-9.7.0-P1/lib/dns/resolver.c
--- bind-9.7.0-P1/lib/dns/resolver.c.rh507429	2010-03-26 14:53:12.776469537 +0100
+++ bind-9.7.0-P1/lib/dns/resolver.c	2010-03-26 15:07:18.363969402 +0100
@@ -6160,6 +6160,7 @@ resume_dslookup(isc_task_t *task, isc_ev
 	if (fevent->result == ISC_R_CANCELED) {
 		dns_resolver_destroyfetch(&fctx->nsfetch);
 		fctx_done(fctx, ISC_R_CANCELED, __LINE__);
+		goto cleanup;
 	} else if (fevent->result == ISC_R_SUCCESS) {
 
 		FCTXTRACE("resuming DS lookup");
@@ -6219,15 +6220,16 @@ resume_dslookup(isc_task_t *task, isc_ev
 						  resume_dslookup, fctx,
 						  &fctx->nsrrset, NULL,
 						  &fctx->nsfetch);
-		if (result != ISC_R_SUCCESS)
+		if (result != ISC_R_SUCCESS) {
 			fctx_done(fctx, result, __LINE__);
-		else {
-			LOCK(&res->buckets[bucketnum].lock);
-			locked = ISC_TRUE;
-			fctx->references++;
+			goto cleanup;
 		}
 	}
 
+	LOCK(&res->buckets[bucketnum].lock);
+	locked = ISC_TRUE;
+	fctx->references++;
+
  cleanup:
 	if (dns_rdataset_isassociated(&nameservers))
 		dns_rdataset_disassociate(&nameservers);