Zero fp, this fixes bug no #475

This commit is contained in:
Holger Vogt 2020-02-19 23:43:23 +01:00
parent 93233fde2c
commit 28c0fbf397
1 changed files with 1 additions and 0 deletions

View File

@ -448,6 +448,7 @@ static Table2_Data_t *init_local_data(const char *filename, int order)
lFileRead = fread(cFile, sizeof(char), lFileLen, fp);
const int file_error = ferror(fp);
fclose(fp); /* done with file */
fp = (FILE *) NULL;
if (file_error) {
cm_message_printf("Error reading data file %s", filename);
xrc = -1;