diff options
author | Jamey Sharp <jamey@minilop.net> | 2006-11-19 01:04:26 -0800 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2006-11-19 01:04:26 -0800 |
commit | 60dccd9a7be95e35b4b8c90934888efedfde84cc (patch) | |
tree | daff220f6ca77639f10acf555e0c06ab60e59664 | |
parent | 41710257257939b181a1615937610550b40621b9 (diff) |
Bug #8663: _XiCheckExtInit must drop the Display lock in all error cases.
-rw-r--r-- | src/XExtInt.c | 14 |
1 files changed, 10 insertions, 4 deletions
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)); |