Browse Source

prevent double closing of file (Linux does not NULL fp during fclose)

pre-master-46
Holger Vogt 6 years ago
parent
commit
eab10ee065
  1. 1
      src/xspice/icm/table/table3D/cfunc.mod

1
src/xspice/icm/table/table3D/cfunc.mod

@ -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…
Cancel
Save