Commit a41d45ee authored by Adam Jackson's avatar Adam Jackson 🎧

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.
parent 535f1465
......@@ -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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment