add_message memory leak in hunger()

extremes memory leak in default_order()
This commit is contained in:
Enno Rehling 2005-05-08 00:03:31 +00:00
parent 26745e16f7
commit 0a2be8f2b8
2 changed files with 3 additions and 3 deletions

View File

@ -2734,7 +2734,7 @@ hunger(int number, unit * u)
if (dead) { if (dead) {
/* Gestorbene aus der Einheit nehmen, /* Gestorbene aus der Einheit nehmen,
* Sie bekommen keine Beerdingung. */ * Sie bekommen keine Beerdingung. */
add_message(&u->faction->msgs, new_message(u->faction, ADDMSG(&u->faction->msgs, new_message(u->faction,
"starvation%u:unit%r:region%i:dead%i:live", u, r, dead, u->number-dead)); "starvation%u:unit%r:region%i:dead%i:live", u, r, dead, u->number-dead));
scale_number(u, u->number - dead); scale_number(u, u->number - dead);
@ -3247,7 +3247,7 @@ default_order(const struct locale * lang)
struct order * ord; struct order * ord;
struct orders * next; struct orders * next;
} * defaults = NULL; } * defaults = NULL;
struct orders * olist = NULL; struct orders * olist = defaults;
while (olist) { while (olist) {
if (olist->lang==lang) return olist->ord; if (olist->lang==lang) return olist->ord;
olist = olist->next; olist = olist->next;

View File

@ -78,9 +78,9 @@ typedef struct faction {
struct ugroup *ugroups; struct ugroup *ugroups;
#endif #endif
#ifdef MSG_LEVELS #ifdef MSG_LEVELS
struct msglevel * msglevels;
struct warning * warnings; struct warning * warnings;
#endif #endif
struct msglevel * msglevels;
struct ally *allies; struct ally *allies;
struct group *groups; struct group *groups;
boolean alive; /* enno: sollte ein flag werden */ boolean alive; /* enno: sollte ein flag werden */