[ion/simulator] Don't leak file descriptors

This commit is contained in:
Romain Goyet
2020-09-17 15:49:30 -04:00
committed by Léa Saviot
parent f578c24af1
commit 7c8c7f79f6

View File

@@ -58,7 +58,9 @@ void load(const char * filename) {
return;
}
load(f);
fclose(f);
if (f != stdin) {
fclose(f);
}
}
static inline bool save(FILE * f) {