diff options
author | Jamey Sharp <jamey@minilop.net> | 2006-11-19 01:04:26 -0800 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2007-04-10 23:22:51 +0300 |
commit | 8ee33d7f4f7f428e3995f767deed22a4c46f2eca (patch) | |
tree | 882082d1b88096ee2daf41889df299e16b8cb51b | |
parent | 540b4cc6f5657c870079b4bf883c9297ab434d71 (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 2f61dce..f9f2f96 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 */ @@ -181,6 +178,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. @@ -196,7 +199,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)); |