summaryrefslogtreecommitdiff
path: root/src/core/main.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-03-24 21:06:27 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-05 20:00:55 -0400
commit245802dd89ccf10de446faff5577e041d5372062 (patch)
tree30ffc96cbcfa09331168254df4b92f9fc5f558d7 /src/core/main.c
parentc84a94883161073239c35d181e25823ff0454f68 (diff)
Use _cleanup_ when reading config files
Diffstat (limited to 'src/core/main.c')
-rw-r--r--src/core/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/core/main.c b/src/core/main.c
index 4d21dd97a3..921476a042 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -704,7 +704,7 @@ static int parse_config_file(void) {
{ NULL, NULL, NULL, 0, NULL }
};
- FILE *f;
+ FILE _cleanup_fclose_ *f;
const char *fn;
int r;
@@ -722,8 +722,6 @@ static int parse_config_file(void) {
if (r < 0)
log_warning("Failed to parse configuration file: %s", strerror(-r));
- fclose(f);
-
return 0;
}