summaryrefslogtreecommitdiff
path: root/dix/window.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2008-07-08 15:12:45 +0930
committerPeter Hutterer <peter.hutterer@who-t.net>2008-07-10 16:02:54 +0930
commitdb86b8839f286e0e2efb5638b8ab2fe608707655 (patch)
tree44a09d1ba83ad1834270368dafb7c5dc9871148c /dix/window.c
parent08e2c625f620688d35f3b443ffb878e8e991ff57 (diff)
dix: free GenericMask allocations when destroying window.
Diffstat (limited to 'dix/window.c')
-rw-r--r--dix/window.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/dix/window.c b/dix/window.c
index 541d19902..a780d64c7 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -822,6 +822,8 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
static void
DisposeWindowOptional (WindowPtr pWin)
{
+ GenericMaskPtr gmask = NULL, next = NULL;
+
if (!pWin->optional)
return;
/*
@@ -855,6 +857,17 @@ DisposeWindowOptional (WindowPtr pWin)
xfree(pWin->optional->access.perm);
xfree(pWin->optional->access.deny);
+ /* Remove generic event mask allocations */
+ if (pWin->optional->geMasks)
+ gmask = pWin->optional->geMasks->geClients;
+ while(gmask)
+ {
+ next = gmask->next;
+ xfree(gmask);
+ gmask = next;
+ }
+ xfree (pWin->optional->geMasks);
+
xfree (pWin->optional);
pWin->optional = NULL;
}