summaryrefslogtreecommitdiff
path: root/src/settingsgen/settingsgen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settingsgen/settingsgen.cpp')
-rw-r--r--src/settingsgen/settingsgen.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/settingsgen/settingsgen.cpp b/src/settingsgen/settingsgen.cpp
index 44a3f6f26..ac6db6581 100644
--- a/src/settingsgen/settingsgen.cpp
+++ b/src/settingsgen/settingsgen.cpp
@@ -371,7 +371,10 @@ static bool CompareFiles(const char *n1, const char *n2)
if (f2 == NULL) return false;
FILE *f1 = fopen(n1, "rb");
- if (f1 == NULL) error("can't open %s", n1);
+ if (f1 == NULL) {
+ fclose(f2);
+ error("can't open %s", n1);
+ }
size_t l1, l2;
do {