1
0
Fork 0

Fix #7988: Memory leak when using custom depot names

pull/7995/head 1.10.0-RC1
Charles Pigott 2020-02-09 11:44:45 +00:00
parent 887dce4655
commit 49d2a07f66
1 changed files with 2 additions and 0 deletions

View File

@ -27,6 +27,8 @@ INSTANTIATE_POOL_METHODS(Depot)
*/ */
Depot::~Depot() Depot::~Depot()
{ {
free(this->name);
if (CleaningPool()) return; if (CleaningPool()) return;
if (!IsDepotTile(this->xy) || GetDepotIndex(this->xy) != this->index) { if (!IsDepotTile(this->xy) || GetDepotIndex(this->xy) != this->index) {