mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 08:04:30 +00: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:
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user