mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-12-22 07:18:53 +00:00
Close file before exit to avoid potential resource leak
This commit is contained in:
parent
5fbfa8a656
commit
82f07c5626
@ -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]);
|
||||
|
Loading…
Reference in New Issue
Block a user