Fix memory leak after use XGetAtomName

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 7 years ago
parent 52510f43ac
commit ab525f2baa

@ -4339,10 +4339,13 @@ void NETWinInfo::update(const unsigned long dirty_props[]) {
for (count = 0; count < nitems_ret; count++) { for (count = 0; count < nitems_ret; count++) {
#ifdef NETWMDEBUG #ifdef NETWMDEBUG
char* debug_action = XGetAtomName(p->display, (Atom) actions[count]);
fprintf(stderr, fprintf(stderr,
"NETWinInfo::update: adding allowed action %ld '%s'\n", "NETWinInfo::update: adding allowed action %ld '%s'\n",
actions[count], actions[count], debug_action);
XGetAtomName(p->display, (Atom) actions[count])); if( debug_action ) {
XFree( debug_action );
}
#endif #endif
if ((Atom) actions[count] == net_wm_action_move) if ((Atom) actions[count] == net_wm_action_move)

Loading…
Cancel
Save