From: Alan T. DeKok Date: Tue, 17 May 2022 14:39:19 +0000 (-0400) Subject: Revert "close on error. Fixes #4518" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c66f8761d19f3630198fcb817dc63bfdf599a974;p=thirdparty%2Ffreeradius-server.git Revert "close on error. Fixes #4518" This reverts commit 4040e326d7bc637f55cdb029ea3c3127de3d2a96. this is done by cf_stack_cleanup(), and there are many other paths in cf_file_include() which do "return -1" without closing the file. --- diff --git a/src/lib/server/cf_file.c b/src/lib/server/cf_file.c index 9837a177dfc..de45ccb5439 100644 --- a/src/lib/server/cf_file.c +++ b/src/lib/server/cf_file.c @@ -2325,9 +2325,6 @@ do_frame: * See if EOF was unexpected. */ if (feof(frame->fp) && (parent != frame->parent)) { - fclose(frame->fp); - frame->fp = NULL; - ERROR("%s[%d]: EOF reached without closing brace for section %s starting at line %d", frame->filename, frame->lineno, cf_section_name1(parent), cf_lineno(parent)); return -1;