From 851b243f01b64109fb9a3098c5cd8d3122d1f233 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 24 Jan 2009 17:02:59 +0000 Subject: (svn r15259) -Fix: [NewGRF] small memory leak when scanning labels --- src/newgrf.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 7618bd005..99774c397 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -6169,6 +6169,9 @@ void LoadNewGRF(uint load_index, uint file_index) ClearTemporaryNewGRFData(_cur_grffile); BuildCargoTranslationMap(); DEBUG(sprite, 2, "LoadNewGRF: Currently %i sprites are loaded", _cur_spriteid); + } else if (stage == GLS_INIT && HasBit(c->flags, GCF_INIT_ONLY)) { + /* We're not going to activate this, so free whatever data we allocated */ + ClearTemporaryNewGRFData(_cur_grffile); } } } -- cgit v1.2.3-70-g09d2