all repos — fluxbox @ c65f2ec6fbaea0d844b29470d2ce2891ffc5d2c4

custom fork of the fluxbox windowmanager

Use XFree to free memory (not the default "delete").
Gregor Bollerhey gbsoftware@arcor.de
commit

c65f2ec6fbaea0d844b29470d2ce2891ffc5d2c4

parent

7e762f0a972b7714f76a94e537dd65d0067f67b2

1 files changed, 5 insertions(+), 1 deletions(-)

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

@@ -592,7 +592,11 @@ static int client_to_ordinal(const std::vector<std::string> left,

const std::vector<std::string> right, TrayWindow *i) { - std::unique_ptr<XClassHint> xclasshint (XAllocClassHint()); + auto Xdeleter = [](XClassHint *x){XFree(x);}; + + std::unique_ptr<XClassHint, decltype(Xdeleter)> + xclasshint (XAllocClassHint(), Xdeleter); + if(XGetClassHint(Fluxbox::instance()->display(), i->window(), xclasshint.get()) != BadWindow) {