From: Mark Andrews Date: Wed, 11 Jul 2001 13:31:01 +0000 (+0000) Subject: 929. [bug] RUNTIME_CHECK() used inappropriately in named.conf X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=839ec054c8a07ce2d4a7e0569cb79dfff59b124c;p=thirdparty%2Fbind9.git 929. [bug] RUNTIME_CHECK() used inappropriately in named.conf parser. --- diff --git a/CHANGES b/CHANGES index 08088df2943..5d97d303445 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,5 @@ + 929. [bug] RUNTIME_CHECK() used inappropriately in named.conf + parser. 926. [bug] The resolver could deadlock with the ADB when shutting down (multithreaded builds only). diff --git a/lib/dns/config/confparser.y.dirty b/lib/dns/config/confparser.y.dirty index 136ba88519d..1537d5c77e4 100644 --- a/lib/dns/config/confparser.y.dirty +++ b/lib/dns/config/confparser.y.dirty @@ -33,7 +33,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: confparser.y.dirty,v 1.44.2.8 2001/03/21 18:34:31 bwelling Exp $ */ +/* $Id: confparser.y.dirty,v 1.44.2.9 2001/07/11 13:31:01 marka Exp $ */ #include @@ -6501,31 +6501,39 @@ keyword_init(void) { struct token *tok; isc_symvalue_t symval; + isc_result_t result; - RUNTIME_CHECK(isc_symtab_create(memctx, 97 /* prime < 100 */, - NULL, NULL, ISC_FALSE, - &keywords) == ISC_R_SUCCESS); + result = isc_symtab_create(memctx, 97 /* prime < 100 */, + NULL, NULL, ISC_FALSE, &keywords); + if (result != ISC_R_SUCCESS) + return (result); /* Stick all the keywords into the main symbol table. */ for (tok = &keyword_tokens[0] ; tok->token != NULL ; tok++) { symval.as_integer = tok->yaccval; - RUNTIME_CHECK(isc_symtab_define(keywords, tok->token, - KEYWORD_SYM_TYPE, symval, - isc_symexists_reject) == - ISC_R_SUCCESS); + result = isc_symtab_define(keywords, tok->token, + KEYWORD_SYM_TYPE, symval, + isc_symexists_reject); + if (result != ISC_R_SUCCESS) + goto fail; } /* Now the class names */ for (tok = &class_symbol_tokens[0] ; tok->token != NULL ; tok++) { symval.as_integer = tok->yaccval; - RUNTIME_CHECK(isc_symtab_define(keywords, tok->token, - CLASS_SYM_TYPE, symval, - isc_symexists_reject) == - ISC_R_SUCCESS); + result = isc_symtab_define(keywords, tok->token, + CLASS_SYM_TYPE, symval, + isc_symexists_reject); + if (result != ISC_R_SUCCESS) + goto fail; } return (ISC_R_SUCCESS); + + fail: + isc_symtab_destroy(&keywords); + return (result); }