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 | 7473cef063b24186dd7712a48a49eb047b615793 (patch) | |
tree | a230f8e2382f895c7a16d78755e7954950493e47 /roadveh_cmd.c | |
parent | bcc9dcd210ed4571644adf8c76922afdc4b50835 (diff) | |
download | openttd-7473cef063b24186dd7712a48a49eb047b615793.tar.xz |
(svn r1959) -Fix: Repaired two memleaks I have hacked :(
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r-- | roadveh_cmd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c index 93f6927a1..fb078b174 100644 --- a/roadveh_cmd.c +++ b/roadveh_cmd.c @@ -1697,8 +1697,11 @@ void OnNewDay_RoadVeh(Vehicle *v) //We do not have a slot, so make one if (v->u.road.slot == NULL) { //first we need to find out how far our stations are away. - if ( rs == NULL ) + if ( rs == NULL ) { + free(firststop); + firststop = stop = NULL; goto no_stop; + } DEBUG(ms, 2) ("Multistop: Attempting to obtain a slot for vehicle %d at station %d (0x%x)", v->unitnumber, st->index, st->xy); do { |