mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5556
82f07c5
Close file before exit to avoid potential resource leak (JesusRami)
This commit is contained in:
commit
347d6b268a
1 changed files with 1 additions and 0 deletions
|
@ -48,6 +48,7 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
if ((fp = fopen(argv[i], "rb")) == NULL) {
|
if ((fp = fopen(argv[i], "rb")) == NULL) {
|
||||||
|
fclose(foutput);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
} else {
|
} else {
|
||||||
fprintf(foutput, "static const std::string translation_file_name_%d = \"%s\";\n", i, argv[i]);
|
fprintf(foutput, "static const std::string translation_file_name_%d = \"%s\";\n", i, argv[i]);
|
||||||
|
|
Loading…
Reference in a new issue