From: Wouter Wijngaards Date: Tue, 24 May 2016 13:07:13 +0000 (+0000) Subject: - remove memory leak from lame-check patch. X-Git-Tag: release-1.5.9rc1~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=58a1b9928c78d6c97f133a1fb9bb61f8fb382018;p=thirdparty%2Funbound.git - remove memory leak from lame-check patch. git-svn-id: file:///svn/unbound/trunk@3726 be551aaa-1e26-0410-a405-d3ace91eadb9 --- diff --git a/doc/Changelog b/doc/Changelog index 64b774072..f7ac114cf 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -1,5 +1,6 @@ 24 May 2016: Wouter - disable-dnssec-lame-check config option from Charles Walker. + - remove memory leak from lame-check patch. 23 May 2016: Wouter - Fix #767: Reference to an expired Internet-Draft in diff --git a/util/configparser.c b/util/configparser.c index 78c5f1f3f..c2035bad6 100644 --- a/util/configparser.c +++ b/util/configparser.c @@ -4008,12 +4008,13 @@ yyreduce: yyerror("expected yes or no."); else cfg_parser->cfg->disable_dnssec_lame_check = (strcmp((yyvsp[0].str), "yes")==0); + free((yyvsp[0].str)); } -#line 4013 "util/configparser.c" /* yacc.c:1646 */ +#line 4014 "util/configparser.c" /* yacc.c:1646 */ break; -#line 4017 "util/configparser.c" /* yacc.c:1646 */ +#line 4018 "util/configparser.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires @@ -4241,7 +4242,7 @@ yyreturn: #endif return yyresult; } -#line 1700 "./util/configparser.y" /* yacc.c:1906 */ +#line 1701 "./util/configparser.y" /* yacc.c:1906 */ /* parse helper routines could be here */ diff --git a/util/configparser.y b/util/configparser.y index ee1dead5d..4ff18f0ce 100644 --- a/util/configparser.y +++ b/util/configparser.y @@ -1696,6 +1696,7 @@ server_disable_dnssec_lame_check: VAR_DISABLE_DNSSEC_LAME_CHECK STRING_ARG yyerror("expected yes or no."); else cfg_parser->cfg->disable_dnssec_lame_check = (strcmp($2, "yes")==0); + free($2); } %%