46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
commit 60dccd9a7be95e35b4b8c90934888efedfde84cc
|
|
Author: Jamey Sharp <jamey@minilop.net>
|
|
Date: Sun Nov 19 01:04:26 2006 -0800
|
|
|
|
Bug #8663: _XiCheckExtInit must drop the Display lock in all error cases.
|
|
|
|
diff --git a/src/XExtInt.c b/src/XExtInt.c
|
|
index 427e406..8366104 100644
|
|
--- a/src/XExtInt.c
|
|
+++ b/src/XExtInt.c
|
|
@@ -80,9 +80,6 @@ typedef struct _XInputData
|
|
XExtensionVersion *vers;
|
|
} XInputData;
|
|
|
|
-#define XInputCheckExtension(dpy,i,val) \
|
|
- XextCheckExtension (dpy, i, xinput_extension_name, val)
|
|
-
|
|
static /* const */ XExtensionHooks xinput_extension_hooks = {
|
|
NULL, /* create_gc */
|
|
NULL, /* copy_gc */
|
|
@@ -183,6 +180,12 @@ _xidevicebusy(dpy, error)
|
|
*error = info->codes->first_error + XI_DeviceBusy;
|
|
}
|
|
|
|
+static int XInputCheckExtension(Display *dpy, XExtDisplayInfo *info)
|
|
+{
|
|
+ XextCheckExtension (dpy, info, xinput_extension_name, 0);
|
|
+ return 1;
|
|
+}
|
|
+
|
|
/***********************************************************************
|
|
*
|
|
* Check to see if the input extension is installed in the server.
|
|
@@ -198,7 +201,10 @@ _XiCheckExtInit(dpy, version_index, info
|
|
{
|
|
XExtensionVersion *ext;
|
|
|
|
- XInputCheckExtension(dpy, info, -1);
|
|
+ if (!XInputCheckExtension(dpy, info)) {
|
|
+ UnlockDisplay(dpy);
|
|
+ return (-1);
|
|
+ }
|
|
|
|
if (info->data == NULL) {
|
|
info->data = (XPointer) Xmalloc(sizeof(XInputData));
|