Fix #7988: Memory leak when using custom depot names

pull/132/head
Charles Pigott 4 years ago
parent 2f264f2c92
commit e340934d04

@ -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) {

Loading…
Cancel
Save