(svn r1959) -Fix: Repaired two memleaks I have hacked :(

This commit is contained in:
Celestar
2005-03-08 16:27:26 +00:00
parent bcc9dcd210
commit 7473cef063
2 changed files with 7 additions and 1 deletions

View File

@@ -131,6 +131,9 @@ static int GetTrainAcceleration(Vehicle *v, bool mode)
sum += dist[i];
}
free(dist);
dist = NULL;
if (numcurve > 0) {
sum /= numcurve;
}