diff options
author | Michal Srb <msrb@suse.com> | 2014-11-01 20:00:51 +0200 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2014-11-03 15:28:35 +1000 |
commit | 22ae8d4f26e92b17e1ce8239a38481933d6f1ca7 (patch) | |
tree | cd8cb5789e84ea3ec0f97fbf721bc994176cb1ac /src/XIQueryDevice.c | |
parent | 71a42145b678be623e30bd5bf55833a04f14376f (diff) |
Fix double unlock when _XiCheckExtInit return -1.
_XiCheckExtInit unlocks the display if it fails and returns -1. Most callers
account for it properly, but few didn't.
Signed-off-by: Michal Srb <msrb@suse.com>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src/XIQueryDevice.c')
-rw-r--r-- | src/XIQueryDevice.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/XIQueryDevice.c b/src/XIQueryDevice.c index 4be1eca..fb8504f 100644 --- a/src/XIQueryDevice.c +++ b/src/XIQueryDevice.c @@ -50,7 +50,7 @@ XIQueryDevice(Display *dpy, int deviceid, int *ndevices_return) LockDisplay(dpy); if (_XiCheckExtInit(dpy, XInput_2_0, extinfo) == -1) - goto error; + goto error_unlocked; GetReq(XIQueryDevice, req); req->reqType = extinfo->codes->major_opcode; @@ -105,6 +105,7 @@ XIQueryDevice(Display *dpy, int deviceid, int *ndevices_return) error: UnlockDisplay(dpy); +error_unlocked: SyncHandle(); *ndevices_return = -1; return NULL; |