# HG changeset patch # User rubidium # Date 2011-11-27 09:37:30 # Node ID 742a1f3c2adf91f72a11471ac4a78f8bfec3f7e7 # Parent 4ca8353212e16f08f0f7826e5bdf5d14fe375d51 (svn r23341) -Fix (r23338): memory leak when converting rails diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -1588,6 +1588,7 @@ CommandCost CmdConvertRail(TileIndex til } } + delete iter; return (cost.GetCost() == 0) ? error : cost; }