summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-09-16 17:14:07 +0000
committerrubidium <rubidium@openttd.org>2014-09-16 17:14:07 +0000
commit2485b40cdd08faaa88ca2f3cde5cdeb5715cf830 (patch)
treee0ccc88b19dae654314d75169d8dadb7787be7f5 /src
parent01dae23dc7c2c6d5bcdb9c1c8d7c04808dd7b1e7 (diff)
downloadopenttd-2485b40cdd08faaa88ca2f3cde5cdeb5715cf830.tar.xz
(svn r26828) -Fix: memory leak when passing -c multiple times
Diffstat (limited to 'src')
-rw-r--r--src/openttd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index c430cf67e..c149ebbd4 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -667,7 +667,7 @@ int openttd_main(int argc, char *argv[])
goto exit_noshutdown;
}
case 'G': scanner->generation_seed = atoi(mgo.opt); break;
- case 'c': _config_file = stredup(mgo.opt); break;
+ case 'c': free(_config_file); _config_file = stredup(mgo.opt); break;
case 'x': scanner->save_config = false; break;
case 'h':
i = -2; // Force printing of help.