summaryrefslogtreecommitdiff
path: root/roadveh_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-12-22 19:16:56 +0000
committertron <tron@openttd.org>2004-12-22 19:16:56 +0000
commit51cbbd0438ba770fa02a13ea089d2af318e63231 (patch)
tree0e26ab16760faf87e3aaa36d52e3e85e0b270d5d /roadveh_gui.c
parent51257991c0286859d16922ae7caddab71ec859cf (diff)
downloadopenttd-51cbbd0438ba770fa02a13ea089d2af318e63231.tar.xz
(svn r1232) Plug memory leak
Diffstat (limited to 'roadveh_gui.c')
-rw-r--r--roadveh_gui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/roadveh_gui.c b/roadveh_gui.c
index 2b81393cb..ed7f2201b 100644
--- a/roadveh_gui.c
+++ b/roadveh_gui.c
@@ -879,6 +879,10 @@ static void PlayerRoadVehWndProc(Window *w, WindowEvent *e)
vl->resort_timer = DAY_TICKS * PERIODIC_RESORT_DAYS;
break;
+ case WE_DESTROY:
+ free(vl->sort_list);
+ break;
+
case WE_TICK: /* resort the list every 20 seconds orso (10 days) */
if (--vl->resort_timer == 0) {
DEBUG(misc, 1) ("Periodic resort road vehicles list player %d station %d",