forked from github/server
add_message memory leak in hunger()
extremes memory leak in default_order()
This commit is contained in:
parent
26745e16f7
commit
0a2be8f2b8
|
@ -2734,7 +2734,7 @@ hunger(int number, unit * u)
|
|||
if (dead) {
|
||||
/* Gestorbene aus der Einheit nehmen,
|
||||
* 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));
|
||||
|
||||
scale_number(u, u->number - dead);
|
||||
|
@ -3247,7 +3247,7 @@ default_order(const struct locale * lang)
|
|||
struct order * ord;
|
||||
struct orders * next;
|
||||
} * defaults = NULL;
|
||||
struct orders * olist = NULL;
|
||||
struct orders * olist = defaults;
|
||||
while (olist) {
|
||||
if (olist->lang==lang) return olist->ord;
|
||||
olist = olist->next;
|
||||
|
|
|
@ -78,9 +78,9 @@ typedef struct faction {
|
|||
struct ugroup *ugroups;
|
||||
#endif
|
||||
#ifdef MSG_LEVELS
|
||||
struct msglevel * msglevels;
|
||||
struct warning * warnings;
|
||||
#endif
|
||||
struct msglevel * msglevels;
|
||||
struct ally *allies;
|
||||
struct group *groups;
|
||||
boolean alive; /* enno: sollte ein flag werden */
|
||||
|
|
Loading…
Reference in New Issue