added TmpOutFile=NULL; after closing TmpOutFile
In case of [TIMES] Statistic not equal NONE (see page 174 of Epanet2 users manual) ENclose() function tries to close TmpOutFile again giving a "double free or corruption" error
This commit is contained in:
@@ -503,6 +503,7 @@ int savefinaloutput()
|
|||||||
ERRCODE(savetimestat(x,LINKHDR));
|
ERRCODE(savetimestat(x,LINKHDR));
|
||||||
if (!errcode) Nperiods = 1;
|
if (!errcode) Nperiods = 1;
|
||||||
fclose(TmpOutFile);
|
fclose(TmpOutFile);
|
||||||
|
TmpOutFile=NULL;
|
||||||
free(x);
|
free(x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user