summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Azzarone <azzaronea@gmail.com>2011-07-31 00:20:42 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-07-31 00:20:42 +0800
commit36d6b677f19c92ca2fd1d48d330df076cfaa1c29 (patch)
tree079e294092505f97ed13e59dec2cd48fb4859653
parent46e7890656f14903a1c29a4e8514270d4bf24c0e (diff)
parent0590eb09e4a09d50218781fd2c4dab7721af3f71 (diff)
downloadworkarounds-36d6b677f19c92ca2fd1d48d330df076cfaa1c29.tar.gz
workarounds-36d6b677f19c92ca2fd1d48d330df076cfaa1c29.tar.bz2
Merge lp:~andyrock/compiz-workarounds-plugin/fix-memory-leak
-rw-r--r--src/workarounds.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/workarounds.cpp b/src/workarounds.cpp
index 27d16fb..52abf44 100644
--- a/src/workarounds.cpp
+++ b/src/workarounds.cpp
@@ -711,7 +711,7 @@ WorkaroundsWindow::getFixedWindowType ()
newWmType = window->wmType ();
- if (!XGetClassHint (screen->dpy (), window->id (), &classHint) != Success)
+ if (XGetClassHint (screen->dpy (), window->id (), &classHint) != Success)
return newWmType;
if (classHint.res_name)
@@ -719,6 +719,11 @@ WorkaroundsWindow::getFixedWindowType ()
resName = CompString (classHint.res_name);
XFree (classHint.res_name);
}
+
+ if (classHint.res_class)
+ {
+ XFree (classHint.res_class);
+ }
/* FIXME: Is this the best way to detect a notification type window? */
if (ws->optionGetNotificationDaemonFix ())