aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/config.c b/config.c
index ddee720..8e7e581 100644
--- a/config.c
+++ b/config.c
@@ -491,7 +491,9 @@ int config_read(char* cfg_filepath){
rv = 0;
bail:
free(source_dir);
- fclose(source);
+ if(source){
+ fclose(source);
+ }
free(line_raw);
return rv;
}