We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7f95b5 commit 2343e4bCopy full SHA for 2343e4b
src/compton.c
@@ -5466,12 +5466,17 @@ parse_config(session_t *ps, struct options_tmp *pcfgtmp) {
5466
}
5467
#endif
5468
5469
- if (CONFIG_FALSE == config_read(&cfg, f)) {
5470
- printf("Error when reading configuration file \"%s\", line %d: %s\n",
5471
- path, config_error_line(&cfg), config_error_text(&cfg));
5472
- config_destroy(&cfg);
5473
- free(path);
5474
- return;
+ {
+ int read_result = config_read(&cfg, f);
+ fclose(f);
+ f = NULL;
+ if (CONFIG_FALSE == read_result) {
+ printf("Error when reading configuration file \"%s\", line %d: %s\n",
5475
+ path, config_error_line(&cfg), config_error_text(&cfg));
5476
+ config_destroy(&cfg);
5477
+ free(path);
5478
+ return;
5479
+ }
5480
5481
config_set_auto_convert(&cfg, 1);
5482
0 commit comments