From 071655edef7e5b7a77582254be9523998b48f31e Mon Sep 17 00:00:00 2001 From: Nick White Date: Sat, 5 Jul 2008 14:20:28 +0100 Subject: Close config files after use --- src/config.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 2d537ce..b22e158 100644 --- a/src/config.c +++ b/src/config.c @@ -90,6 +90,8 @@ int loadconfig(char * getht_path, struct config * options) fprintf(stderr, "config.ini: Option '%s' not recognised, ignoring\n", option); } + fclose(config_file); + return 0; } @@ -142,6 +144,8 @@ int writefreshconfig(char * getht_path, struct config * options) if(options->proxy.pass[0]) fprintf(config_file, "%s = %s\n", "proxy_pass", options->proxy.pass); + fclose(config_file); + return 0; } @@ -160,7 +164,9 @@ int updateconfig(char * getht_path, struct config * options) return 1; } - fprintf(stderr,"Not yet implemented.\n"); + /* Not yet implemented */ + + fclose(config_file); return 1; } -- cgit v1.2.3