diff options
author | luigi1111 <luigi1111w@gmail.com> | 2019-07-24 14:11:16 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2019-07-24 14:11:16 -0500 |
commit | 347d6b268a2a856af7a189e50963ff5e4697abca (patch) | |
tree | 649af9d509a657030f2c60da78c957de22416ea2 | |
parent | Merge pull request #5534 (diff) | |
parent | Close file before exit to avoid potential resource leak (diff) | |
download | monero-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.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]); |