diff -r ef44f62cb8b9 -r 22c441f5adf9 src/newgrf_config.cpp --- a/src/newgrf_config.cpp Mon May 05 12:35:38 2008 +0000 +++ b/src/newgrf_config.cpp Wed May 07 21:09:51 2008 +0000 @@ -1,6 +1,6 @@ /* $Id$ */ -/** @file newgrf_config.cpp */ +/** @file newgrf_config.cpp Finding NewGRFs and configuring them. */ #include "stdafx.h" #include "openttd.h" @@ -18,10 +18,6 @@ #include "fios.h" #include -#ifdef WIN32 -# include -#endif /* WIN32 */ - GRFConfig *_all_grfs; GRFConfig *_grfconfig; @@ -410,7 +406,6 @@ * For that we first have to make an array, the qsort and * then remake the linked list. */ GRFConfig **to_sort = MallocT(num); - if (to_sort == NULL) return; // No memory, then don't sort uint i = 0; for (GRFConfig *p = _all_grfs; p != NULL; p = p->next, i++) { @@ -426,6 +421,8 @@ } to_sort[num - 1]->next = NULL; _all_grfs = to_sort[0]; + + free(to_sort); }