summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2010-01-22 14:03:36 +0000
committerpeter1138 <peter1138@openttd.org>2010-01-22 14:03:36 +0000
commitbb71c61ee1dce8fa55454f73d3c9bdae54335973 (patch)
tree4a40e880fb275b089ea06259b8fd5bee0c58bc99 /src
parent927f149ff2caa2203398ff1bee3c892477fe54e7 (diff)
downloadopenttd-bb71c61ee1dce8fa55454f73d3c9bdae54335973.tar.xz
(svn r18885) -Fix (r18884): Industry tile layouts weren't completely freed on error.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index bbfbc6091..74a1f4323 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -2344,6 +2344,9 @@ static ChangeInfoResult IndustriesChangeInfo(uint indid, int numinfo, int prop,
}
}
} catch (...) {
+ for (int i = 0; i < indsp->num_table; i++) {
+ free(tile_table[i]);
+ }
free(tile_table);
free(itt);
throw;