dix: free GenericMask allocations when destroying window.
This commit is contained in:
parent
08e2c625f6
commit
db86b8839f
13
dix/window.c
13
dix/window.c
|
@ -822,6 +822,8 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
||||||
static void
|
static void
|
||||||
DisposeWindowOptional (WindowPtr pWin)
|
DisposeWindowOptional (WindowPtr pWin)
|
||||||
{
|
{
|
||||||
|
GenericMaskPtr gmask = NULL, next = NULL;
|
||||||
|
|
||||||
if (!pWin->optional)
|
if (!pWin->optional)
|
||||||
return;
|
return;
|
||||||
/*
|
/*
|
||||||
|
@ -855,6 +857,17 @@ DisposeWindowOptional (WindowPtr pWin)
|
||||||
xfree(pWin->optional->access.perm);
|
xfree(pWin->optional->access.perm);
|
||||||
xfree(pWin->optional->access.deny);
|
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);
|
xfree (pWin->optional);
|
||||||
pWin->optional = NULL;
|
pWin->optional = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ typedef struct _WindowOpt {
|
||||||
#endif
|
#endif
|
||||||
struct _OtherInputMasks *inputMasks; /* default: NULL */
|
struct _OtherInputMasks *inputMasks; /* default: NULL */
|
||||||
DevCursorList deviceCursors; /* default: NULL */
|
DevCursorList deviceCursors; /* default: NULL */
|
||||||
struct _GenericClientMasks *geMasks;/* default: NULL */
|
struct _GenericClientMasks *geMasks; /* default: NULL */
|
||||||
WindowAccessRec access;
|
WindowAccessRec access;
|
||||||
} WindowOptRec, *WindowOptPtr;
|
} WindowOptRec, *WindowOptPtr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue