aboutsummaryrefslogtreecommitdiff
path: root/translations
diff options
context:
space:
mode:
authorJesusRami <jesus.rami.serra@gmail.com>2019-05-19 05:53:50 +0000
committerJesusRami <jesus.rami.serra@gmail.com>2019-05-19 05:53:50 +0000
commit82f07c562609cfd98acb2d63fbff0eaf3deab62f (patch)
tree84c8e7397d56bfd93887a17137333592b87013e4 /translations
parentMerge pull request #5548 (diff)
downloadmonero-82f07c562609cfd98acb2d63fbff0eaf3deab62f.tar.xz
Close file before exit to avoid potential resource leak
Diffstat (limited to 'translations')
-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]);