aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-07-24 14:11:16 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-07-24 14:11:16 -0500
commit347d6b268a2a856af7a189e50963ff5e4697abca (patch)
tree649af9d509a657030f2c60da78c957de22416ea2
parentMerge pull request #5534 (diff)
parentClose file before exit to avoid potential resource leak (diff)
downloadmonero-347d6b268a2a856af7a189e50963ff5e4697abca.tar.xz
Merge pull request #5556
82f07c5 Close file before exit to avoid potential resource leak (JesusRami)
-rw-r--r--translations/generate_translations_header.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/translations/generate_translations_header.c b/translations/generate_translations_header.c
index 4c80eec31..85e9b9b27 100644
--- a/translations/generate_translations_header.c
+++ b/translations/generate_translations_header.c
@@ -48,6 +48,7 @@ int main(int argc, char *argv[]) {
for (i = 1; i < argc; i++) {
if ((fp = fopen(argv[i], "rb")) == NULL) {
+ fclose(foutput);
exit(EXIT_FAILURE);
} else {
fprintf(foutput, "static const std::string translation_file_name_%d = \"%s\";\n", i, argv[i]);