aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Bollerhey <gbsoftware@arcor.de>2013-12-15 02:40:22 (GMT)
committerJan Sucan <jan@jansucan.com>2020-04-05 07:47:18 (GMT)
commitc65f2ec6fbaea0d844b29470d2ce2891ffc5d2c4 (patch)
tree5560c4fc947846d2bf5abaf3ca0c6d372b11d49c
parent7e762f0a972b7714f76a94e537dd65d0067f67b2 (diff)
downloadfluxbox-c65f2ec6fbaea0d844b29470d2ce2891ffc5d2c4.zip
fluxbox-c65f2ec6fbaea0d844b29470d2ce2891ffc5d2c4.tar.bz2
Use XFree to free memory (not the default "delete").
-rw-r--r--src/SystemTray.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/SystemTray.cc b/src/SystemTray.cc
index 4b2cf56..a5fcc79 100644
--- a/src/SystemTray.cc
+++ b/src/SystemTray.cc
@@ -592,7 +592,11 @@ static int client_to_ordinal(const std::vector<std::string> left,
592 const std::vector<std::string> right, 592 const std::vector<std::string> right,
593 TrayWindow *i) { 593 TrayWindow *i) {
594 594
595 std::unique_ptr<XClassHint> xclasshint (XAllocClassHint()); 595 auto Xdeleter = [](XClassHint *x){XFree(x);};
596
597 std::unique_ptr<XClassHint, decltype(Xdeleter)>
598 xclasshint (XAllocClassHint(), Xdeleter);
599
596 if(XGetClassHint(Fluxbox::instance()->display(), 600 if(XGetClassHint(Fluxbox::instance()->display(),
597 i->window(), xclasshint.get()) != BadWindow) 601 i->window(), xclasshint.get()) != BadWindow)
598 { 602 {