forked from github/server
fix some failing tests.
This commit is contained in:
parent
5b807e2057
commit
8c11cb676f
|
@ -918,6 +918,8 @@ void free_region(region * r)
|
||||||
unit *u = r->units;
|
unit *u = r->units;
|
||||||
r->units = u->next;
|
r->units = u->next;
|
||||||
uunhash(u);
|
uunhash(u);
|
||||||
|
u->region = NULL;
|
||||||
|
u_setfaction(u, NULL);
|
||||||
free_unit(u);
|
free_unit(u);
|
||||||
free(u);
|
free(u);
|
||||||
}
|
}
|
||||||
|
|
|
@ -749,6 +749,7 @@ void free_units(void)
|
||||||
while (deleted_units) {
|
while (deleted_units) {
|
||||||
unit *u = deleted_units;
|
unit *u = deleted_units;
|
||||||
deleted_units = deleted_units->next;
|
deleted_units = deleted_units->next;
|
||||||
|
u_setfaction(u, NULL);
|
||||||
free_unit(u);
|
free_unit(u);
|
||||||
free(u);
|
free(u);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue