[PATCH v2] dix: fix memory leak, free event list on shutdown. (#25028)

Peter Hutterer peter.hutterer at who-t.net
Mon Nov 30 23:00:01 PST 2009


X.Org Bug 25028 <http://bugs.freedesktop.org/show_bug.cgi?id=25028>

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
thanks for the review, I didn't spot FreeEventList the first time around.
though IIRC I wrote it myself, but...

 dix/events.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index 015c2b1..7e0867c 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -5080,12 +5080,9 @@ InitEvents(void)
 void
 CloseDownEvents(void)
 {
-    int len;
-    EventListPtr list;
-
-    len = GetEventList(&list);
-    while(len--)
-        xfree(list[len].event);
+    FreeEventList(InputEventList, InputEventListLen);
+    InputEventListLen = 0;
+    InputEventList = NULL;
 }
 
 /**
-- 
1.6.5.2


More information about the xorg-devel mailing list