Skip to content

Commit

Permalink
Fix #7988: Memory leak when using custom depot names
Browse files Browse the repository at this point in the history
  • Loading branch information
LordAro committed Feb 9, 2020
1 parent 887dce4 commit 49d2a07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/depot.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 49d2a07

Please sign in to comment.