Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 409529
Collapse All | Expand All

(-)a/bin/named/server.c (-5 / +16 lines)
Lines 5273-5289 load_zones(ns_server_t *server) { Link Here
5273
	     view != NULL;
5273
	     view != NULL;
5274
	     view = ISC_LIST_NEXT(view, link))
5274
	     view = ISC_LIST_NEXT(view, link))
5275
	{
5275
	{
5276
		if (view->managed_keys != NULL)
5276
		if (view->managed_keys != NULL) {
5277
			CHECK(dns_zone_load(view->managed_keys));
5277
			result = dns_zone_load(view->managed_keys);
5278
		if (view->redirect != NULL)
5278
			if (result != ISC_R_SUCCESS && result != DNS_R_UPTODATE)
5279
			CHECK(dns_zone_load(view->redirect));
5279
				goto cleanup;
5280
		}
5281
		if (view->redirect != NULL) {
5282
			result = dns_zone_load(view->redirect);
5283
			if (result != ISC_R_SUCCESS && result != DNS_R_UPTODATE)
5284
				goto cleanup;
5285
		}
5286
5287
		/*
5288
		 * 'dns_view_asyncload' calls view_loaded if there are no
5289
		 * zones.
5290
		 */
5280
		isc_refcount_increment(&zl->refs, NULL);
5291
		isc_refcount_increment(&zl->refs, NULL);
5281
		CHECK(dns_view_asyncload(view, view_loaded, zl));
5292
		CHECK(dns_view_asyncload(view, view_loaded, zl));
5282
	}
5293
	}
5283
5294
5284
 cleanup:
5295
 cleanup:
5285
	isc_refcount_decrement(&zl->refs, &refs);
5296
	isc_refcount_decrement(&zl->refs, &refs);
5286
	if (result != ISC_R_SUCCESS || refs == 0) {
5297
	if (refs == 0) {
5287
		isc_refcount_destroy(&zl->refs);
5298
		isc_refcount_destroy(&zl->refs);
5288
		isc_mem_put(server->mctx, zl, sizeof (*zl));
5299
		isc_mem_put(server->mctx, zl, sizeof (*zl));
5289
	} else {
5300
	} else {

Return to bug 409529