diff options
author | cbdev <cb@cbcdn.com> | 2019-11-07 19:00:37 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2019-11-07 19:00:37 +0100 |
commit | 988bcbe79115e55929390bcac5493abb4ca20011 (patch) | |
tree | ac1f97509215c5e794e35ed27a0dccd2d81da0ea | |
parent | 350f0d2d2eaff5f0d57b09857102e2df1e96d733 (diff) | |
download | midimonster-988bcbe79115e55929390bcac5493abb4ca20011.tar.gz midimonster-988bcbe79115e55929390bcac5493abb4ca20011.tar.bz2 midimonster-988bcbe79115e55929390bcac5493abb4ca20011.zip |
Only fclose configuration file if it has been opened previously (Coverity CID 350443)
-rw-r--r-- | config.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; } |