diff options
author | JesusRami <jesus.rami.serra@gmail.com> | 2019-05-19 05:53:50 +0000 |
---|---|---|
committer | JesusRami <jesus.rami.serra@gmail.com> | 2019-05-19 05:53:50 +0000 |
commit | 82f07c562609cfd98acb2d63fbff0eaf3deab62f (patch) | |
tree | 84c8e7397d56bfd93887a17137333592b87013e4 | |
parent | Merge pull request #5548 (diff) | |
download | monero-82f07c562609cfd98acb2d63fbff0eaf3deab62f.tar.xz |
Close file before exit to avoid potential resource leak
-rw-r--r-- | translations/generate_translations_header.c | 1 |
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]); |