one more fix needed to avoid leaking file descriptors

This commit is contained in:
Axel Kohlmeyer
2013-12-16 11:13:41 +01:00
parent a4b57f648c
commit 5904fc2d3d

View File

@ -242,7 +242,8 @@ void Input::file(const char *filename)
if (me == 0) {
if (nfile > 1)
error->one(FLERR,"Invalid use of library file() function");
if (infile && infile != stdin) fclose(infile);
infile = fopen(filename,"r");
if (infile == NULL) {
char str[128];