From 9bd079d4257e9d49bb22244edd2d103620bc8896 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Wed, 9 Mar 2005 19:48:20 +0000 Subject: (svn r1978) - Fix: Plug some memleaks; thanks Valgrind --- station_gui.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'station_gui.c') diff --git a/station_gui.c b/station_gui.c index 90a547c72..702351c14 100644 --- a/station_gui.c +++ b/station_gui.c @@ -82,8 +82,7 @@ static void GlobalSortStationList(void) uint16 *i; // reset #-of stations to 0 because ++ is used for value-assignment - for (i = _num_station_sort; i != endof(_num_station_sort); i++) - *i = 0; + memset(_num_station_sort, 0, sizeof(_num_station_sort)); /* Create array for sorting */ _station_sort = realloc(_station_sort, GetStationPoolSize() * sizeof(_station_sort[0])); -- cgit v1.2.3-70-g09d2