mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 16:30:19 +01:00
dix: Fix undefined memset in dixInitPrivates
When we set these up initially, no subsystems have allocated any privates yet, so the storage address will be null, and memset(NULL, ...) is undefined.
This commit is contained in:
parent
535f14656a
commit
a41d45eedc
1 changed files with 2 additions and 1 deletions
|
|
@ -447,7 +447,8 @@ _dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type)
|
|||
if (global_keys[type].offset == 0)
|
||||
addr = 0;
|
||||
*privates = addr;
|
||||
memset(addr, '\0', global_keys[type].offset);
|
||||
if (addr)
|
||||
memset(addr, '\0', global_keys[type].offset);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue