From d50a1592fa1b13902019002a4e2061227b48beec Mon Sep 17 00:00:00 2001 From: David CARLIER Date: Tue, 28 Mar 2017 09:32:22 +0100 Subject: [PATCH] Prevent double allocations of string allocated config values Prevent double allocations of string allocated config values since they can be set by default and then set again by reading the config file. --- src/openrct2/config/Config.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/openrct2/config/Config.cpp b/src/openrct2/config/Config.cpp index 753302ad97..db0a5a2821 100644 --- a/src/openrct2/config/Config.cpp +++ b/src/openrct2/config/Config.cpp @@ -598,11 +598,13 @@ extern "C" void config_set_defaults() { + config_release(); Config::SetDefaults(); } bool config_open(const utf8 * path) { + config_release(); return Config::ReadFile(path); }