From e340934d04a26a8917f23f73141556e85fbae0b1 Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Sun, 9 Feb 2020 11:44:45 +0000 Subject: Fix #7988: Memory leak when using custom depot names --- src/depot.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/depot.cpp b/src/depot.cpp index 05e2af3d4..9207c6362 100644 --- a/src/depot.cpp +++ b/src/depot.cpp @@ -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) { -- cgit v1.2.3-54-g00ecf