From: Mark Andrews Date: Tue, 20 Feb 2018 01:46:35 +0000 (+1100) Subject: adjust goto target and conditional compilation so that cleanup_spillattimer and clean... X-Git-Tag: v9.13.0~136^2~9 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=7b27be54ee9a97ef8caadb08ac6dec0966bdffcb;p=thirdparty%2Fbind9.git adjust goto target and conditional compilation so that cleanup_spillattimer and cleanup_alglock labels match the element to be cleanup and so that they are always used --- diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c index a6e6f9dafc7..bdb07df2451 100644 --- a/lib/dns/resolver.c +++ b/lib/dns/resolver.c @@ -9821,7 +9821,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; @@ -9830,12 +9834,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);