don't let kore_parse_config_file() call fclose.

It doesn't own the FILE pointer, it shouldn't call fclose() on it,
thats just confusing.
This commit is contained in:
Joris Vink 2018-04-10 14:39:57 +02:00
parent 43a0aef29f
commit 85cff54a5f
2 changed files with 3 additions and 3 deletions

View File

@ -65,6 +65,6 @@ kore_parent_configure(int argc, char **argv)
if (chdir(module) == -1)
fatal("chdir(%s): %s", module, errno_s);
/* kore_parse_config_file() will call fclose(). */
kore_parse_config_file(fp);
(void)fclose(fp);
}

View File

@ -204,6 +204,7 @@ kore_parse_config(void)
#endif
kore_parse_config_file(fp);
(void)fclose(fp);
if (!kore_module_loaded())
fatal("no application module was loaded");
@ -295,8 +296,6 @@ kore_parse_config_file(FILE *fp)
printf("ignoring \"%s\" on line %d\n", p, lineno);
lineno++;
}
fclose(fp);
}
static int
@ -308,6 +307,7 @@ configure_include(char *path)
fatal("failed to open include '%s'", path);
kore_parse_config_file(fp);
(void)fclose(fp);
return (KORE_RESULT_OK);
}