]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
adjust goto target and conditional compilation so that cleanup_spillattimer and clean...
authorMark Andrews <marka@isc.org>
Tue, 20 Feb 2018 01:46:35 +0000 (12:46 +1100)
committerMark Andrews <marka@isc.org>
Sun, 25 Feb 2018 23:54:18 +0000 (10:54 +1100)
(cherry picked from commit 7b27be54ee9a97ef8caadb08ac6dec0966bdffcb)
(cherry picked from commit 981d548a6660547d444a672092602de8be142a9b)

lib/dns/resolver.c

index 977afb9a5a4cdf1a81714618780f6b9965de416b..2c60294d968ccb4d15d35779e5015eff2b2f16cd 100644 (file)
@@ -8453,7 +8453,11 @@ dns_resolver_create(dns_view_t *view,
 #if USE_MBSLOCK
        result = isc_rwlock_init(&res->mbslock, 0, 0);
        if (result != ISC_R_SUCCESS)
+#if USE_ALGLOCK
                goto cleanup_alglock;
+#else
+               goto cleanup_spillattimer;
+#endif
 #endif
 
        res->magic = RES_MAGIC;
@@ -8462,12 +8466,11 @@ dns_resolver_create(dns_view_t *view,
 
        return (ISC_R_SUCCESS);
 
-#if USE_MBSLOCK
+#if USE_ALGLOCK && USE_MBSLOCK
  cleanup_alglock:
-#if USE_ALGLOCK
        isc_rwlock_destroy(&res->alglock);
 #endif
-#endif
+
 #if USE_ALGLOCK || USE_MBSLOCK
  cleanup_spillattimer:
        isc_timer_detach(&res->spillattimer);