summaryrefslogtreecommitdiff
path: root/src/strgen
diff options
context:
space:
mode:
Diffstat (limited to 'src/strgen')
-rw-r--r--src/strgen/strgen.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index fa2942465..c231717da 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -215,7 +215,10 @@ 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 {