memory leaked by item reports in the CR.

This commit is contained in:
Enno Rehling 2005-04-30 11:46:11 +00:00
parent 7c8b416338
commit 304ac20747
1 changed files with 9 additions and 1 deletions

View File

@ -864,6 +864,14 @@ cr_output_unit(FILE * F, const region * r,
} }
fprintf(F, "%d;%s\n", in, add_translation(ic, locale_string(f->locale, ic))); fprintf(F, "%d;%s\n", in, add_translation(ic, locale_string(f->locale, ic)));
} }
if (show!=u->items) {
/* free the temporary items */
while (show) {
item * ishow = show;
show = show->next;
i_free(ishow);
}
}
if ((u->faction == f || omniscient(f)) && u->botschaften) if ((u->faction == f || omniscient(f)) && u->botschaften)
cr_output_str_list(F, "EINHEITSBOTSCHAFTEN", u->botschaften, f); cr_output_str_list(F, "EINHEITSBOTSCHAFTEN", u->botschaften, f);