prevent double closing of file (Linux does not NULL fp during fclose)
This commit is contained in:
parent
99cfe7bc81
commit
9f8509d53c
|
|
@ -468,6 +468,7 @@ static Table3_Data_t *init_local_data(const char *filename, int interporder)
|
||||||
lFileRead = fread(cFile, sizeof(char), lFileLen, fp);
|
lFileRead = fread(cFile, sizeof(char), lFileLen, fp);
|
||||||
const int file_error = ferror(fp);
|
const int file_error = ferror(fp);
|
||||||
fclose(fp); /* done with file */
|
fclose(fp); /* done with file */
|
||||||
|
fp = (FILE *) NULL;
|
||||||
if (file_error) {
|
if (file_error) {
|
||||||
cm_message_printf("Error reading data file %s", filename);
|
cm_message_printf("Error reading data file %s", filename);
|
||||||
xrc = -1;
|
xrc = -1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue