mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2025-12-20 02:20:03 +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> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2075>
This commit is contained in:
parent
19c6195e71
commit
0ee6039053
1 changed files with 2 additions and 0 deletions
|
|
@ -727,6 +727,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