summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2017-03-25 13:24:19 +0100
committerSlávek Banko <[email protected]>2017-03-25 13:24:42 +0100
commit164063ce4e9e049deff99f8dd03fcf8f36cfd301 (patch)
tree39a5df4f81b99374f466e6f83f47f7fa2dff9c43
parent69e342999889b8b033f09f75c7cd29c9f56b8064 (diff)
downloadtdelibs-164063ce4e9e049deff99f8dd03fcf8f36cfd301.tar.gz
tdelibs-164063ce4e9e049deff99f8dd03fcf8f36cfd301.zip
Fix memory leak after use XGetAtomName
Signed-off-by: Slávek Banko <[email protected]> (cherry picked from commit ab525f2baada44f6dd8c80970c2875a0b19b3a05)
-rw-r--r--tdecore/netwm.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/tdecore/netwm.cpp b/tdecore/netwm.cpp
index bc352c8bc..c1e876eeb 100644
--- a/tdecore/netwm.cpp
+++ b/tdecore/netwm.cpp
@@ -4339,10 +4339,13 @@ void NETWinInfo::update(const unsigned long dirty_props[]) {
for (count = 0; count < nitems_ret; count++) {
#ifdef NETWMDEBUG
+ char* debug_action = XGetAtomName(p->display, (Atom) actions[count]);
fprintf(stderr,
"NETWinInfo::update: adding allowed action %ld '%s'\n",
- actions[count],
- XGetAtomName(p->display, (Atom) actions[count]));
+ actions[count], debug_action);
+ if( debug_action ) {
+ XFree( debug_action );
+ }
#endif
if ((Atom) actions[count] == net_wm_action_move)