Changeset - r9133:8ef222bc2a90
[Not reviewed]
master
0 1 0
smatz - 16 years ago 2008-05-07 17:36:28
smatz@openttd.org
(svn r12993) -Fix (r11175): list used for sorting GRFs wasn't freed
1 file changed with 2 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/newgrf_config.cpp
Show inline comments
 
@@ -406,7 +406,6 @@ void ScanNewGRFFiles()
 
	 * For that we first have to make an array, the qsort and
 
	 * then remake the linked list. */
 
	GRFConfig **to_sort = MallocT<GRFConfig*>(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++) {
 
@@ -422,6 +421,8 @@ void ScanNewGRFFiles()
 
	}
 
	to_sort[num - 1]->next = NULL;
 
	_all_grfs = to_sort[0];
 

	
 
	free(to_sort);
 
}
 

	
 

	
0 comments (0 inline, 0 general)