all repos — openbox @ 9aaf4f8de762a540780aaef54d15802762dc4130

openbox fork - make it a bit more like ryudo

some memory bugs from woodblock (thanks!)
Dana Jansens danakj@orodu.net
commit

9aaf4f8de762a540780aaef54d15802762dc4130

parent

75a068cca2be843fc91521d94f0c7915b3e52598

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

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

@@ -1303,6 +1303,7 @@ dims[(i * 4) + 3] = area.height();

} xatom->setValue(getRootWindow(), XAtom::net_workarea, XAtom::cardinal, dims, 4 * workspacesList.size()); + delete [] dims; } else xatom->setValue(getRootWindow(), XAtom::net_workarea, XAtom::cardinal, 0, 0);
M src/Window.ccsrc/Window.cc

@@ -1225,9 +1225,12 @@

num = PropMwmHintsElements; if (! xatom->getValue(client.window, XAtom::motif_wm_hints, XAtom::motif_wm_hints, num, - (unsigned long **)&mwm_hint) || - num < PropMwmHintsElements) + (unsigned long **)&mwm_hint)) + return; + if (num < PropMwmHintsElements) { + delete [] mwm_hint; return; + } if (mwm_hint->flags & MwmHintsDecorations) { if (mwm_hint->decorations & MwmDecorAll) {

@@ -1268,7 +1271,7 @@ if (mwm_hint->functions & MwmFuncClose)

functions |= Func_Close; } } - delete mwm_hint; + delete [] mwm_hint; }

@@ -1286,9 +1289,12 @@

num = PropBlackboxHintsElements; if (! xatom->getValue(client.window, XAtom::blackbox_hints, XAtom::blackbox_hints, num, - (unsigned long **)&blackbox_hint) || - num < PropBlackboxHintsElements) + (unsigned long **)&blackbox_hint)) + return False; + if (num < PropBlackboxHintsElements) { + delete [] blackbox_hint; return False; + } if (blackbox_hint->flags & AttribShaded) flags.shaded = (blackbox_hint->attrib & AttribShaded);

@@ -1350,7 +1356,7 @@

reconfigure(); } - delete blackbox_hint; + delete [] blackbox_hint; return True; }

@@ -2103,7 +2109,7 @@ XAtom::blackbox_attributes, num,

(unsigned long **)&net)) return; if (num < PropBlackboxAttributesElements) { - delete net; + delete [] net; return; }

@@ -2169,7 +2175,7 @@

// with the state set it will then be the map event's job to read the // window's state and behave accordingly - delete net; + delete [] net; }