mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-13 09:39:10 +00:00
Fix #7988: Memory leak when using custom depot names
This commit is contained in:
@@ -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) {
|
||||||
|
Reference in New Issue
Block a user