mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-26 14:52:13 +00: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:
committed by
Marge Bot
parent
19c6195e71
commit
0ee6039053
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user