forked from github/server
Memory Leaks:
- Kampf - Globalreport, Adressen - XPath - at_luxuries
This commit is contained in:
parent
d61e5eae56
commit
71ee47751a
|
@ -1617,8 +1617,14 @@ make_cmd(unit * u, struct order * ord)
|
|||
}
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
static void
|
||||
free_luxuries(struct attrib * a)
|
||||
{
|
||||
i_freeall((item*)a->data.v);
|
||||
}
|
||||
|
||||
const attrib_type at_luxuries = {
|
||||
"luxuries", NULL, NULL, NULL, NULL, NULL
|
||||
"luxuries", NULL, free_luxuries, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
static void
|
||||
|
|
|
@ -2592,8 +2592,8 @@ global_report(const char * filename)
|
|||
add_seen(seen, r, see_unit, true);
|
||||
}
|
||||
report_computer(F, monsters, seen, addresses, time(NULL));
|
||||
freelist(addresses);
|
||||
seen_done(seen);
|
||||
|
||||
fclose(F);
|
||||
}
|
||||
|
||||
|
|
|
@ -3228,16 +3228,18 @@ free_battle(battle * b)
|
|||
side *side;
|
||||
fighter *fighter;
|
||||
meffect *meffect;
|
||||
bfaction * bf;
|
||||
int max_fac_no = 0;
|
||||
|
||||
if (bdebug) {
|
||||
fclose(bdebug);
|
||||
}
|
||||
|
||||
for (bf=b->factions;bf;bf=bf->next) {
|
||||
while (b->factions) {
|
||||
bfaction * bf = b->factions;
|
||||
faction * f = bf->faction;
|
||||
b->factions = bf->next;
|
||||
max_fac_no = max(max_fac_no, f->no);
|
||||
free(bf);
|
||||
}
|
||||
|
||||
cv_foreach(side, b->sides) {
|
||||
|
@ -3257,9 +3259,6 @@ free_battle(battle * b)
|
|||
}
|
||||
cv_next(meffect);
|
||||
cv_kill(&b->meffects);
|
||||
/*
|
||||
cv_kill(&b->factions);
|
||||
*/
|
||||
}
|
||||
|
||||
static int *
|
||||
|
|
|
@ -504,6 +504,7 @@ xml_readweapon(xmlXPathContextPtr xpath, item_type * itype)
|
|||
xmlFree(property);
|
||||
}
|
||||
}
|
||||
xmlXPathFreeObject(races);
|
||||
}
|
||||
xmlXPathFreeObject(result);
|
||||
|
||||
|
|
Loading…
Reference in New Issue