[PATCH] dix: plug memory leak in DeviceEnterLeaveEvents.

Peter Hutterer peter.hutterer at who-t.net
Tue Sep 22 23:32:22 PDT 2009


'event' must be freed before exiting.

Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 dix/events.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dix/events.c b/dix/events.c
index a79cf6d..d60b8a5 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -4414,10 +4414,12 @@ DeviceEnterLeaveEvent(
                         filter, grab);
     } else {
         if (!GetWindowXI2Mask(mouse, pWin, (xEvent*)event))
-            return;
+            goto out;
         DeliverEventsToWindow(mouse, pWin, (xEvent*)event, 1, filter,
                               NullGrab);
     }
+
+out:
     xfree(event);
 }
 
-- 
1.6.3.rc1.2.g0164.dirty



More information about the xorg-devel mailing list