mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +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>
(cherry picked from commit 0ee6039053)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user