summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-06-25 13:23:09 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-06-25 20:03:31 +0930
commita81b5ce452766bbc4b2ac0849711284ba8591b46 (patch)
tree62a119b22047c7abe1a4138c660aa5e4be5880e8
parent3a2beb2f867fd47dc5a7723dcac345ea0b0ecf3d (diff)
dix: free memory associated with the EventList. #16507
Un-deprecates CloseDownEvents. X.Org Bug 16507 <http://bugs.freedesktop.org/show_bug.cgi?id=16507>
-rw-r--r--dix/events.c11
-rw-r--r--dix/main.c1
2 files changed, 7 insertions, 5 deletions
diff --git a/dix/events.c b/dix/events.c
index 7bd682526..f6309f29d 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -5520,14 +5520,15 @@ InitEvents(void)
FatalError("[dix] Failed to allocate input event list.\n");
}
-/**
- * This function is deprecated! It shouldn't be used anymore. It used to free
- * the spriteTraces, but now they are freed when the SpriteRec is freed.
- */
-_X_DEPRECATED void
+void
CloseDownEvents(void)
{
+ int len;
+ EventListPtr list;
+ len = GetEventList(&list);
+ while(len--)
+ xfree(list[len].event);
}
/**
diff --git a/dix/main.c b/dix/main.c
index e0bb18024..3bc45fb37 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -437,6 +437,7 @@ int main(int argc, char *argv[], char *envp[])
memset(WindowTable, 0, MAXSCREENS * sizeof(WindowPtr));
CloseDownDevices();
+ CloseDownEvents();
for (i = screenInfo.numScreens - 1; i >= 0; i--)
{