[PATCH xserver] xfree86: fix unbalanced input_lock/unlock in xf86NewInputDevice()
Keith Packard
keithp at keithp.com
Fri Aug 12 04:27:29 UTC 2016
Peter Hutterer <peter.hutterer at who-t.net> writes:
> diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c
> index 42d0f32..054eb3e 100644
> --- a/hw/xfree86/common/xf86Xinput.c
> +++ b/hw/xfree86/common/xf86Xinput.c
> @@ -961,6 +961,7 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable)
> xf86Msg(X_ERROR, "Couldn't init device \"%s\"\n", pInfo->name);
> RemoveDevice(dev, TRUE);
> rval = BadMatch;
> + input_unlock();
> goto unwind;
> }
> /* send enter/leave event, update sprite window */
> --
> 2.7.4
>
The remaining OsReleaseSignals call should have been a clue. That should
be removed in this same patch. I think we could put the input_unlock right where
the OsReleaseSignals call is, but it is safer to place it where you
have.
With the call to OsReleaseSignals removed, this is
Reviewed-by: Keith Packard <keithp at keithp.com>
--
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20160811/1162b95a/attachment-0001.sig>
More information about the xorg-devel
mailing list