From 28c0fbf397640d0a5f622b471e75c0c62192e712 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 19 Feb 2020 23:43:23 +0100 Subject: [PATCH] Zero fp, this fixes bug no #475 --- src/xspice/icm/table/table2D/cfunc.mod | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xspice/icm/table/table2D/cfunc.mod b/src/xspice/icm/table/table2D/cfunc.mod index 77760dae6..ef636404a 100644 --- a/src/xspice/icm/table/table2D/cfunc.mod +++ b/src/xspice/icm/table/table2D/cfunc.mod @@ -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;