]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Revert "close on error. Fixes #4518"
authorAlan T. DeKok <aland@freeradius.org>
Tue, 17 May 2022 14:39:19 +0000 (10:39 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 17 May 2022 15:17:42 +0000 (11:17 -0400)
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.

src/lib/server/cf_file.c

index 9837a177dfccd7934cd24c6b341270923d72fa1c..de45ccb543953a43dc71ce32a9ffff4b8a43080f 100644 (file)
@@ -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;