Index: client/helpdata.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/helpdata.c,v retrieving revision 1.28 diff -u -r1.28 helpdata.c --- helpdata.c 2000/05/24 19:12:56 1.28 +++ helpdata.c 2000/06/11 19:17:04 @@ -351,11 +351,13 @@ strcat(long_buffer, "\n\n"); } } + free(paras); wordwrap_string(long_buffer, 68); pitem->text=mystrdup(long_buffer); genlist_insert(&help_nodes, pitem, -1); } + free(sec); section_file_check_unused(sf, sf->filename); section_file_free(sf); booted = 1; Index: client/packhand.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/client/packhand.c,v retrieving revision 1.131 diff -u -r1.131 packhand.c --- packhand.c 2000/06/07 16:17:36 1.131 +++ packhand.c 2000/06/11 19:17:08 @@ -1135,6 +1135,7 @@ for(i=0; iruler_titles); + free(get_government(i)->helptext); } free(governments); @@ -1163,6 +1164,7 @@ governments = fc_calloc(game.government_count, sizeof(struct government)); for(i=0; iruler_titles = NULL; + get_government(i)->helptext = NULL; } free_nations(game.nation_count); @@ -1474,7 +1476,6 @@ gov->ruler_titles = fc_calloc(gov->num_ruler_titles, sizeof(struct ruler_title)); - free(gov->helptext); gov->helptext = p->helptext; /* pointer assignment */ tilespec_setup_government(p->id); @@ -1568,8 +1569,8 @@ terrain_control.river_move_mode = p->river_move_mode; terrain_control.river_defense_bonus = p->river_defense_bonus; terrain_control.river_trade_incr = p->river_trade_incr; - terrain_control.river_help_text = - p->river_help_text ? mystrdup(p->river_help_text) : NULL; + free(terrain_control.river_help_text); + terrain_control.river_help_text = p->river_help_text; /* malloc'ed string */ terrain_control.fortress_defense_bonus = p->fortress_defense_bonus; terrain_control.road_superhighway_trade_bonus = p->road_superhighway_trade_bonus; terrain_control.rail_food_bonus = p->rail_food_bonus; Index: common/game.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/common/game.c,v retrieving revision 1.76 diff -u -r1.76 game.c --- game.c 2000/06/10 20:47:03 1.76 +++ game.c 2000/06/11 19:17:12 @@ -710,6 +710,7 @@ city_list_unlink(&game.players[pcity->owner].cities, pcity); map_set_city(pcity->x, pcity->y, NULL); idex_unregister_city(pcity); + free(pcity->worklist); free(pcity); } @@ -791,6 +792,7 @@ game.global_wonders[i]=0; game.player_idx=0; game.player_ptr=&game.players[0]; + terrain_control.river_help_text = NULL; } void initialize_globals(void) Index: server/citytools.c =================================================================== RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v retrieving revision 1.83 diff -u -r1.83 citytools.c --- citytools.c 2000/05/29 13:23:25 1.83 +++ citytools.c 2000/06/11 19:17:16 @@ -1014,6 +1014,8 @@ pnewcity=fc_malloc(sizeof(struct city)); *pnewcity=*pcity; + pnewcity->worklist = fc_malloc(sizeof(struct worklist)); + *pnewcity->worklist = *pcity->worklist; pnewcity->id=get_next_id_number(); idex_register_city(pnewcity);