diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2017-03-25 13:24:19 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2017-07-22 15:56:53 +0200 |
commit | d330c431b46a2bebad1c8048153e35f553d3393e (patch) | |
tree | f27677414f3f6f9754d0e8c6398080426cda96b6 | |
parent | 50f90e9382baf576733600f0f777982f9c0740c6 (diff) | |
download | tdelibs-d330c431b46a2bebad1c8048153e35f553d3393e.tar.gz tdelibs-d330c431b46a2bebad1c8048153e35f553d3393e.zip |
Fix memory leak after use XGetAtomName
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit ab525f2baada44f6dd8c80970c2875a0b19b3a05)
-rw-r--r-- | kdecore/netwm.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kdecore/netwm.cpp b/kdecore/netwm.cpp index bc352c8bc..c1e876eeb 100644 --- a/kdecore/netwm.cpp +++ b/kdecore/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) |