(svn r1232) Plug memory leak

This commit is contained in:
tron 2004-12-22 19:16:56 +00:00
parent 51257991c0
commit 51cbbd0438
4 changed files with 16 additions and 0 deletions

View File

@ -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",

View File

@ -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",

View File

@ -1047,6 +1047,10 @@ static void PlayerShipsWndProc(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 ships list player %d station %d",

View File

@ -1351,6 +1351,10 @@ static void PlayerTrainsWndProc(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 trains list player %d station %d",