From ab525f2baada44f6dd8c80970c2875a0b19b3a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 25 Mar 2017 13:24:19 +0100 Subject: Fix memory leak after use XGetAtomName MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- tdecore/netwm.cpp | 7 +++++-- 1 file 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) -- cgit v1.2.3