forked from github/server
introduced a memory leak i last commit
This commit is contained in:
parent
61f76e6722
commit
e79b36bc36
|
@ -100,10 +100,10 @@ int cmp_xref(const void *a, const void *b)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static rc_xref *xrefs;
|
||||||
race_t old_race(const struct race * rc)
|
race_t old_race(const struct race * rc)
|
||||||
{
|
{
|
||||||
static int cache;
|
static int cache;
|
||||||
static rc_xref *xrefs;
|
|
||||||
int i, l, r;
|
int i, l, r;
|
||||||
|
|
||||||
if (rc_changed(&cache)) {
|
if (rc_changed(&cache)) {
|
||||||
|
@ -170,6 +170,8 @@ void free_races(void) {
|
||||||
while (races) {
|
while (races) {
|
||||||
race * rc = races->next;
|
race * rc = races->next;
|
||||||
free_params(&races->parameters);
|
free_params(&races->parameters);
|
||||||
|
free(xrefs);
|
||||||
|
xrefs = 0;
|
||||||
free(races->_name);
|
free(races->_name);
|
||||||
free(races->def_damage);
|
free(races->def_damage);
|
||||||
free(races);
|
free(races);
|
||||||
|
|
Loading…
Reference in New Issue