summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2008-07-05 14:20:28 +0100
committerNick White <git@njw.me.uk>2008-07-05 14:20:28 +0100
commit071655edef7e5b7a77582254be9523998b48f31e (patch)
tree07e0bf660e1a5f1f6740cd1a878e208bb6938b9b /src/config.c
parent426b90eb144b92048edef8d77b8894b70ee40c72 (diff)
Close config files after use
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c8
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;
}