Changeset - r1455:6e289e92391e
[Not reviewed]
master
0 2 0
Celestar - 20 years ago 2005-03-08 16:27:26
celestar@openttd.org
(svn r1959) -Fix: Repaired two memleaks I have hacked :(
2 files changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
roadveh_cmd.c
Show inline comments
 
@@ -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 {
train_cmd.c
Show inline comments
 
@@ -131,6 +131,9 @@ static int GetTrainAcceleration(Vehicle 
 
		sum += dist[i];
 
	}
 

	
 
	free(dist);
 
	dist = NULL;
 

	
 
	if (numcurve > 0) {
 
		sum /= numcurve;
 
	}
0 comments (0 inline, 0 general)