mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-25 01:59:56 +00:00
Xi: ProcXIPassiveGrabDevice(): move rpcbuf declaration upwards
The code below the `out` label is using the rpcbuf variable, but we have a jump site before the variable is declared. It had been overlooked, because for yet unknown reasons the compiler doesn't complain at all about this. We could assume that it at least moves the stack allocation upwards (always could even happen even on function entry), but we don't know whether the memory is already unitialized. So, to be on safe-side, move the declaration upwards, before the first jump site. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -169,6 +169,8 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
||||
param.other_devices_mode = stuff->grab_mode;
|
||||
}
|
||||
|
||||
x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE };
|
||||
|
||||
if (stuff->cursor != None) {
|
||||
ret = dixLookupResourceByType(&tmp, stuff->cursor,
|
||||
X11_RESTYPE_CURSOR, client, DixUseAccess);
|
||||
@@ -178,8 +180,6 @@ ProcXIPassiveGrabDevice(ClientPtr client)
|
||||
}
|
||||
}
|
||||
|
||||
x_rpcbuf_t rpcbuf = { .swapped = client->swapped, .err_clear = TRUE };
|
||||
|
||||
ret =
|
||||
dixLookupWindow((WindowPtr *) &tmp, stuff->grab_window, client,
|
||||
DixSetAttrAccess);
|
||||
|
||||
Reference in New Issue
Block a user