diff options
author | Nick White <git@njw.me.uk> | 2008-07-05 14:20:28 +0100 |
---|---|---|
committer | Nick White <git@njw.me.uk> | 2008-07-05 14:20:28 +0100 |
commit | 071655edef7e5b7a77582254be9523998b48f31e (patch) | |
tree | 07e0bf660e1a5f1f6740cd1a878e208bb6938b9b | |
parent | 426b90eb144b92048edef8d77b8894b70ee40c72 (diff) |
Close config files after use
-rw-r--r-- | src/config.c | 8 |
1 files changed, 7 insertions, 1 deletions
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; } |