summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-22 21:45:57 +0000
committerrubidium <rubidium@openttd.org>2013-11-22 21:45:57 +0000
commit0eaa8fbfcd38875305012af9ddc845586d8580d8 (patch)
tree564ec0d6ad98c328d6654346dc02677f28589a1e /src
parent33626064011336529c2bda2a1b4d702c635d0564 (diff)
downloadopenttd-0eaa8fbfcd38875305012af9ddc845586d8580d8.tar.xz
(svn r26054) -Fix: minor memory leak in strgen
Diffstat (limited to 'src')
-rw-r--r--src/strgen/strgen.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 909427b56..01eaed4cb 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -290,6 +290,12 @@ struct HeaderFileWriter : HeaderWriter, FileWriter {
fprintf(this->fh, "#define TABLE_STRINGS_H\n");
}
+ /** Free the filename. */
+ ~HeaderFileWriter()
+ {
+ free(real_filename);
+ }
+
void WriteStringID(const char *name, int stringid)
{
if (prev + 1 != stringid) fprintf(this->fh, "\n");