mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 04:40:02 +01:00
Xi: handle allocation failure in add_master_func()
Reported in #1817:
xwayland-24.1.6/redhat-linux-build/../Xi/xibarriers.c:729:5:
warning[-Wanalyzer-null-dereference]:
dereference of NULL ‘AllocBarrierDevice()’
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 0ee6039053)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2076>
This commit is contained in:
parent
a44f3160e8
commit
2ffa120264
1 changed files with 2 additions and 0 deletions
|
|
@ -726,6 +726,8 @@ static void add_master_func(void *res, XID id, void *devid)
|
|||
|
||||
|
||||
pbd = AllocBarrierDevice();
|
||||
if (!pbd)
|
||||
return;
|
||||
pbd->deviceid = *deviceid;
|
||||
|
||||
input_lock();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue