all repos — openbox @ 8f8eba7b962023a7cd702f503c1d9e4645d984fb

openbox fork - make it a bit more like ryudo

fixed memory leak in screen::load()
Dana Jansens danakj@orodu.net
commit

8f8eba7b962023a7cd702f503c1d9e4645d984fb

parent

e75d3560a621976eee5413d3583c14c294fbeab6

1 files changed, 8 insertions(+), 2 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -1192,8 +1192,11 @@ #ifdef HAVE_STRFTIME

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;

@@ -1230,8 +1233,11 @@

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;