rname.seekp(0); rclass.seekp(0);
rname << rscreen.str() << "strftimeFormat" << ends;
rclass << rscreen.str() << "StrftimeFormat" << ends;
- if (config.getValue(rname.str(), rclass.str(), s))
+ if (config.getValue(rname.str(), rclass.str(), s)) {
+ if (resource.strftime_format != NULL)
+ delete [] resource.strftime_format;
resource.strftime_format = bstrdup(s.c_str());
+ }
#else // !HAVE_STRFTIME
rname.seekp(0); rclass.seekp(0);
rname << rscreen.str() << "dateFormat" << ends;
rname.seekp(0); rclass.seekp(0);
rname << rscreen.str() << "rootCommand" << ends;
rclass << rscreen.str() << "RootCommand" << ends;
- if (config.getValue(rname.str(), rclass.str(), s))
+ if (config.getValue(rname.str(), rclass.str(), s)) {
+ if (resource.root_command != NULL)
+ delete [] resource.root_command;
resource.root_command = bstrdup(s.c_str());
+ }
rname.seekp(0); rclass.seekp(0);
rname << rscreen.str() << "opaqueMove" << ends;