Fix #7988: Memory leak when using custom depot names

This commit is contained in:
Charles Pigott 2020-02-09 11:44:45 +00:00
parent 2f264f2c92
commit e340934d04

View File

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