summaryrefslogtreecommitdiff
path: root/aircraft_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
commitd0a1507c34e89005e6e2a7a7c6786b269d4a8058 (patch)
tree0e26ab16760faf87e3aaa36d52e3e85e0b270d5d /aircraft_gui.c
parentdc8ed63071acb3046151dce9c6a4f7d7c332288b (diff)
downloadopenttd-d0a1507c34e89005e6e2a7a7c6786b269d4a8058.tar.xz
(svn r1232) Plug memory leak
Diffstat (limited to 'aircraft_gui.c')
-rw-r--r--aircraft_gui.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/aircraft_gui.c b/aircraft_gui.c
index 9ff7f6b46..41e9767a5 100644
--- a/aircraft_gui.c
+++ b/aircraft_gui.c
@@ -1067,6 +1067,10 @@ static void PlayerAircraftWndProc(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 aircraft list player %d station %d",