xorg-x11-server/0001-dix-UpdateTouchesForGrab-must-only-free-the-listener.patch
Peter Hutterer 0e1e01a399 Fix logspam when trying to free a non-existant grab.
- Update touch patch to upstream version (from fdo #66720)
- re-add xephyr resizable patch, got lost in rebase (#976995)
2013-07-15 10:27:23 +10:00

50 lines
1.9 KiB
Diff

From af07795a384943723de5c6207d07d5af9fb883db Mon Sep 17 00:00:00 2001
From: Peter Hutterer <peter.hutterer@who-t.net>
Date: Fri, 12 Jul 2013 14:10:10 +1000
Subject: [PATCH] dix: UpdateTouchesForGrab must only free the listener grab if
it is non-NULL
If a client calls XIGrabDevice in response to a ButtonPress event (regular
event selection), the device will have a grab, but listener->grab is NULL.
Check for that, to avoid logspam.
[ 26293.863] (EE) BUG: triggered 'if (!pGrab)'
[ 26293.863] (EE) BUG: grabs.c:256 in FreeGrab()
[ 26293.863] (EE)
[ 26293.863] (EE) Backtrace:
[ 26293.864] (EE) 0: /usr/bin/Xorg (FreeGrab+0x54) [0x45d3fc]
[ 26293.864] (EE) 1: /usr/bin/Xorg (UpdateTouchesForGrab+0x135) [0x447d4e]
[ 26293.864] (EE) 2: /usr/bin/Xorg (ActivatePointerGrab+0x1ba) [0x447f3d]
[ 26293.864] (EE) 3: /usr/bin/Xorg (GrabDevice+0x3e6) [0x4503bc]
[ 26293.864] (EE) 4: /usr/bin/Xorg (ProcXIGrabDevice+0x1f9) [0x5981b1]
[ 26293.865] (EE) 5: /usr/bin/Xorg (ProcIDispatch+0x78) [0x58aa17]
[ 26293.865] (EE) 6: /usr/bin/Xorg (Dispatch+0x30d) [0x43347e]
[ 26293.865] (EE) 7: /usr/bin/Xorg (main+0x61d) [0x498175]
[ 26293.865] (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x3df5621b75]
[ 26293.865] (EE) 9: /usr/bin/Xorg (_start+0x29) [0x423a19]
[ 26293.866] (EE) 10: ? (?+0x29) [0x29]
[ 26293.866] (EE)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
---
dix/events.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dix/events.c b/dix/events.c
index 03b2d2e..ed3138d 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1441,7 +1441,8 @@ UpdateTouchesForGrab(DeviceIntPtr mouse)
listener->type = LISTENER_POINTER_GRAB;
else
listener->type = LISTENER_GRAB;
- FreeGrab(listener->grab);
+ if (listener->grab)
+ FreeGrab(listener->grab);
listener->grab = AllocGrab(grab);
}
}
--
1.8.2.1