diff options
author | rubidium <rubidium@openttd.org> | 2013-11-22 21:45:57 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-22 21:45:57 +0000 |
commit | 0eaa8fbfcd38875305012af9ddc845586d8580d8 (patch) | |
tree | 564ec0d6ad98c328d6654346dc02677f28589a1e | |
parent | 33626064011336529c2bda2a1b4d702c635d0564 (diff) | |
download | openttd-0eaa8fbfcd38875305012af9ddc845586d8580d8.tar.xz |
(svn r26054) -Fix: minor memory leak in strgen
-rw-r--r-- | src/strgen/strgen.cpp | 6 |
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"); |