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.
This commit is contained in:
David CARLIER 2017-03-28 09:32:22 +01:00 committed by Michael Steenbeek
parent 5b685d5cad
commit d50a1592fa
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}