diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-05-18 22:56:46 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-05-18 22:56:46 +0100 |
commit | c15a7d4513b51ebd668ced49eb7934a1be748851 (patch) | |
tree | 25ffdca479b13e4816a28c4b45b1d8210b22ac0c /config.c | |
parent | 7764645c80ed542095b97eaa119d2df6340b0330 (diff) |
Avoid memory leak when creating default configuration file.
Diffstat (limited to 'config.c')
-rw-r--r-- | config.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -148,7 +148,6 @@ int createconfigfile(char *filename) { } FILE *fp; -// char line[MAXCHAR]; fp = fopen(filename, "a"); @@ -220,7 +219,7 @@ int createconfigfile(char *filename) { } fclose(fp); + free(dirtmp); + free(dir); return 0; - -exit(1); } |