diff server/ruleset.c server/ruleset.c --- server/ruleset.c Sat Dec 30 16:18:06 2000 +++ server/ruleset.c Tue Jan 9 15:21:01 2001 @@ -440,6 +440,7 @@ name_strlcpy(a->name, name); a++; } + free(sec); } /************************************************************************** @@ -530,6 +531,7 @@ to allow more bonus techs -- sb */ game.rtech.get_bonus_tech = find_tech_by_flag(0,TF_BONUS_TECH); + free(sec); section_file_check_unused(file, filename); section_file_free(file); } @@ -562,6 +564,7 @@ char *name = secfile_lookup_str(file, "%s.name", sec[i]); name_strlcpy(unit_types[i].name, name); } + free(sec); } /************************************************************************** @@ -727,7 +730,6 @@ } free(slist); } - free(sec); lookup_tech_list(file, "u_specials", "partisan_req", game.rtech.partisan_req, filename); @@ -835,6 +837,7 @@ freelog(LOG_DEBUG, "partisan tech is %s", advances[j].name); } + free(sec); section_file_check_unused(file, filename); section_file_free(file); } @@ -875,6 +878,7 @@ name_strlcpy(improvement_types[i].name, name); improvement_types[i].name_orig[0] = 0; } + free(sec); } /************************************************************************** @@ -1184,6 +1188,7 @@ game.rtech.temple_plus = lookup_tech(file, "b_special", "temple_plus", 0, filename, NULL); + free(sec); section_file_check_unused(file, filename); section_file_free(file); } @@ -1216,6 +1221,7 @@ tile_types[i].terrain_name[0] = 0; } } + free(sec); } /************************************************************************** @@ -1356,10 +1362,9 @@ t->helptext = lookup_helptext(file, sec[i]); } + free(sec); section_file_check_unused(file, filename); section_file_free(file); - - return; } /************************************************************************** @@ -1394,6 +1399,7 @@ name_strlcpy(governments[i].name, name); governments[i].index = i; } + free(sec); } /************************************************************************** @@ -1631,6 +1637,7 @@ ai_gov_tech_hints[j].tech = A_LAST; } + free(sec); section_file_check_unused(file, filename); section_file_free(file); } @@ -1749,6 +1756,7 @@ } } } + free(sec); } /************************************************************************** @@ -1979,7 +1987,6 @@ } if(cities) free(cities); } - free(sec); /* read miscellaneous city names */ @@ -1996,6 +2003,7 @@ if (cities) free(cities); + free(sec); section_file_check_unused(file, filename); section_file_free(file); } @@ -2020,6 +2028,7 @@ char *style_name = secfile_lookup_str(file, "%s.name", styles[i]); name_strlcpy(city_styles[i].name, style_name); } + free(styles); } /**************************************************************************