diff options
author | Celestar <Celestar@openttd.org> | 2005-03-08 16:27:26 +0000 |
---|---|---|
committer | Celestar <Celestar@openttd.org> | 2005-03-08 16:27:26 +0000 |
commit | 79b2a245e691699d5d818bc1860a542cc9160198 (patch) | |
tree | a230f8e2382f895c7a16d78755e7954950493e47 /train_cmd.c | |
parent | 99499094a9793224858362b31ce82644193d51a5 (diff) | |
download | openttd-79b2a245e691699d5d818bc1860a542cc9160198.tar.xz |
(svn r1959) -Fix: Repaired two memleaks I have hacked :(
Diffstat (limited to 'train_cmd.c')
-rw-r--r-- | train_cmd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/train_cmd.c b/train_cmd.c index 5aa0ed2bc..683022538 100644 --- a/train_cmd.c +++ b/train_cmd.c @@ -131,6 +131,9 @@ static int GetTrainAcceleration(Vehicle *v, bool mode) sum += dist[i]; } + free(dist); + dist = NULL; + if (numcurve > 0) { sum /= numcurve; } |