From c6102b0b77adb0338d33da2b7fb7b79a70a0eb60 Mon Sep 17 00:00:00 2001 From: Andreas Gustafsson Date: Sat, 22 Jan 2000 02:15:36 +0000 Subject: [PATCH] fix bug in previous change --- bin/lwresd/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bin/lwresd/main.c b/bin/lwresd/main.c index 054580539e..32c83b3f5c 100644 --- a/bin/lwresd/main.c +++ b/bin/lwresd/main.c @@ -92,14 +92,15 @@ create_view(isc_mem_t *mctx) if (result != ISC_R_SUCCESS) goto out; + rootdb = NULL; result = dns_rootns_create(mctx, &rootdb); if (result != ISC_R_SUCCESS) goto out; dns_view_sethints(view, rootdb); + dns_db_detach(&rootdb); dns_view_freeze(view); - dns_db_detach(&rootdb); return (ISC_R_SUCCESS); @@ -107,8 +108,6 @@ out: if (view != NULL) dns_view_detach(&view); - dns_db_detach(&rootdb); - return (result); }